diff --git a/src/components/AppLayout/index.stories.tsx b/src/components/AppLayout/index.stories.tsx index 8a1b0699..411195dd 100644 --- a/src/components/AppLayout/index.stories.tsx +++ b/src/components/AppLayout/index.stories.tsx @@ -16,13 +16,6 @@ const meta: Meta = { parameters: { layout: 'fullscreen', }, - decorators: [ - (Story) => ( -
- -
- ), - ], } export default meta @@ -152,7 +145,8 @@ export const WithNavItemGroups: Story = { Home - Settings + Settings + Users , @@ -211,15 +205,25 @@ export const CustomSurfaceHeader: Story = { ), } -const HomePage = () => { +const HomePage = ({ + handlePageChange, +}: { + handlePageChange: (page: AllPages) => void +}) => { return ( -
+
Home This is the home page. It's the first page you see when you open the app. + +
+ +
) } @@ -237,12 +241,15 @@ const SettingsPage = () => { ) } +// eslint-disable-next-line @typescript-eslint/no-unused-vars, unused-imports/no-unused-vars +const allPages = ['home', 'settings'] as const +type AllPages = (typeof allPages)[number] const SurfaceTransition = () => { - const [page, setPage] = useState<'home' | 'settings'>('settings') + const [page, setPage] = useState('settings') const [isTransitioning, setIsTransitioning] = useState(false) const [direction, setDirection] = useState<'forward' | 'backward'>('forward') - const handlePageChange = (newPage: 'home' | 'settings') => { + const handlePageChange = (newPage: AllPages) => { if (newPage === page || isTransitioning) return // Don't transition if already on that page or transitioning setIsTransitioning(true) @@ -285,7 +292,7 @@ const SurfaceTransition = () => { } return ( -
+