diff --git a/packages/components/button/stories/ToggleButton.stories.tsx b/packages/components/button/stories/ToggleButton.stories.tsx
index 7b9bbabb6c..095f9d96bb 100644
--- a/packages/components/button/stories/ToggleButton.stories.tsx
+++ b/packages/components/button/stories/ToggleButton.stories.tsx
@@ -8,7 +8,7 @@ import { Icon } from '@contentful/f36-icon';
import * as icons from '@contentful/f36-icons';
import { ButtonGroup } from '../src';
-import { ToggleButton } from '../src/ToggleButton';
+import { ToggleButton, ToggleButtonProps } from '../src/ToggleButton';
export default {
title: 'Components/Button components/ToggleButton',
@@ -28,17 +28,17 @@ export default {
},
} as Meta;
-export const Basic = ({ icon, children, isDisabled }) => {
+export const Basic = ({ icon, children, ...rest }: ToggleButtonProps) => {
const [isActive, setIsActive] = useState(false);
return (
}
onToggle={() => {
setIsActive(!isActive);
}}
- icon={icon && }
+ {...rest}
>
{children}
@@ -119,7 +119,7 @@ export const GroupedWithOnlyOneActive = () => {
);
};
-export const Overview = ({ icon, ...props }) => (
+export const Overview = ({ icon, onToggle, ...rest }: ToggleButtonProps) => (
<>
@@ -127,13 +127,15 @@ export const Overview = ({ icon, ...props }) => (
- Default
+
+ Default
+
-
+
Active
-
+
Disabled
@@ -145,24 +147,27 @@ export const Overview = ({ icon, ...props }) => (
}
+ {...rest}
>
Default
}
+ {...rest}
>
Active
}
+ {...rest}
>
Disabled