diff --git a/apps/storybook/stories/DrawerReview5549.stories.tsx b/apps/storybook/stories/DrawerReview5549.stories.tsx new file mode 100644 index 00000000000..3535f35b2a7 --- /dev/null +++ b/apps/storybook/stories/DrawerReview5549.stories.tsx @@ -0,0 +1,113 @@ +// Copyright (c) Meta Platforms, Inc. and affiliates. + +import type {Meta, StoryObj} from '@storybook/react'; +import {Profiler, useState} from 'react'; +import {Drawer} from '@astryxdesign/lab'; +import {Button} from '@astryxdesign/core/Button'; +import {Heading} from '@astryxdesign/core/Heading'; +import {Section} from '@astryxdesign/core/Section'; +import {VStack} from '@astryxdesign/core/Stack'; +import {Text} from '@astryxdesign/core/Text'; + +const meta: Meta = { + title: 'Review/Drawer5549', + component: Drawer, + parameters: {layout: 'centered'}, +}; + +export default meta; +type Story = StoryObj; + +type ReviewGlobals = typeof globalThis & { + __drawer5549Commits?: Array<{phase: string; isOpen: boolean}>; +}; + +export const Lifecycle: Story = { + render: () => { + const [side, setSide] = useState<'start' | 'end' | null>(null); + const [underlayClicks, setUnderlayClicks] = useState(0); + const isOpen = side != null; + return ( +
+ + Transformed application pane +
+ ); + }, +}; + +export const NestedLifecycle: Story = { + render: () => { + const [outerOpen, setOuterOpen] = useState(false); + const [innerOpen, setInnerOpen] = useState(false); + return ( +
+
+ ); + }, +};