diff --git a/src/Toggle/Toggle.tsx b/src/Toggle/Toggle.tsx index 155259021..2fcab3bc5 100644 --- a/src/Toggle/Toggle.tsx +++ b/src/Toggle/Toggle.tsx @@ -7,11 +7,11 @@ import { Box } from "../Box"; import { HelpText, RequirementText } from "../FieldLabel"; import { Field } from "../Form"; import { Text } from "../Type"; +import { ComponentSize, useComponentSize } from "../NDSProvider/ComponentSizeContext"; import { ClickInputLabel } from "../utils"; import { DefaultNDSThemeType } from "../theme.type"; import { getSubset, omitSubset } from "../utils/subset"; import ToggleButton from "./ToggleButton"; -import { ComponentSize, useComponentSize } from "../NDSProvider/ComponentSizeContext"; const labelTextStyles = (theme: DefaultNDSThemeType) => ({ fontSize: theme.fontSizes.small, diff --git a/src/Toggle/ToggleButton.tsx b/src/Toggle/ToggleButton.tsx index f3087d099..2b88c4776 100644 --- a/src/Toggle/ToggleButton.tsx +++ b/src/Toggle/ToggleButton.tsx @@ -51,16 +51,15 @@ const animationConfig: AnimationConfig = { const Switch: React.FC = ({ children, disabled, toggled, onClick }) => ( {children} @@ -70,18 +69,20 @@ const Switch: React.FC = ({ children, disabled, toggled, onClick }) const Slider: React.FC = ({ disabled, children }) => ( = React.forwardRef((props, ref) => {