diff --git a/src/components/disclosure/disclosure.stories.tsx b/src/components/disclosure/disclosure.stories.tsx index ec7477c9..f2cf392e 100644 --- a/src/components/disclosure/disclosure.stories.tsx +++ b/src/components/disclosure/disclosure.stories.tsx @@ -44,3 +44,22 @@ export const Stacked: Story = { ), }; + +export const DefaultOpen: Story = { + render: () => ( +
+ + Disclosure Button + Disclosure Content + + + Disclosure Button + Disclosure Content + + + Disclosure Button + Disclosure Content + +
+ ), +}; diff --git a/src/components/disclosure/disclosure.tsx b/src/components/disclosure/disclosure.tsx index 01c9b9e2..abdb6331 100644 --- a/src/components/disclosure/disclosure.tsx +++ b/src/components/disclosure/disclosure.tsx @@ -33,8 +33,14 @@ const DisclosureButton = ({ children, ...props }: DisclosureButtonProps) => { ); }; -const Disclosure = ({ children }: { children: React.ReactNode }) => { - return {children}; +const Disclosure = ({ + children, + defaultOpen = false, +}: { + children: React.ReactNode; + defaultOpen?: boolean; +}) => { + return {children}; }; Disclosure.Button = DisclosureButton;