Skip to content

Commit

Permalink
WEB-2113 add width arg
Browse files Browse the repository at this point in the history
  • Loading branch information
Pedro Ladaria committed Dec 20, 2024
1 parent 3e366b8 commit 83e5c9c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/__stories__/drawer-story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ import {Text3} from '../text';

export default {
title: 'Components/Modals/Drawer',
component: Drawer,
argTypes: {
width: {
control: {type: 'range', min: 0, max: 1000, step: 1},
},
},
};

type Args = {
Expand All @@ -18,6 +24,7 @@ type Args = {
showButton: boolean;
showSecondaryButton: boolean;
showButtonLink: boolean;
width: number;
};

export const Default = ({
Expand All @@ -29,6 +36,7 @@ export const Default = ({
showButton,
showSecondaryButton,
showButtonLink,
width,
}: Args): JSX.Element => {
const [isOpen, setIsOpen] = React.useState(false);
const [result, setResult] = React.useState('');
Expand All @@ -50,6 +58,7 @@ export const Default = ({
</Stack>
{isOpen && (
<Drawer
width={width}
title={title}
subtitle={subtitle}
description={description}
Expand Down Expand Up @@ -81,4 +90,5 @@ Default.args = {
showButton: true,
showSecondaryButton: true,
showButtonLink: true,
width: 0,
};

0 comments on commit 83e5c9c

Please sign in to comment.