import React from 'react'; import { ComponentMeta } from '@storybook/react'; import { Button } from '@cloudflare/component-button'; import { Card } from '@cloudflare/component-card'; import { Div, P } from '@cloudflare/elements'; import { CL1CompatRouterProvider } from '@cloudflare/util-cl1-compat-router'; import Page from './Page'; type StoryLinkProps = { to: string } & Omit< React.AnchorHTMLAttributes, 'href' >; const StoryLink = React.forwardRef( ({ to, children, ...props }, ref) => ( {children} ) ); StoryLink.displayName = 'StoryLink'; const storyLocation = { pathname: '/' }; const storyNavigate = () => undefined; export default { title: 'Dash/Core/Page', component: Page, parameters: { layout: 'fullscreen', docs: { description: { component: 'A flexible page layout component with header, optional sidebar, and content area. Supports different width configurations and responsive behavior.' } } }, decorators: [ Story => ( ) ] } as ComponentMeta; // Sample content components for stories const SampleContent = () => (

This is sample page content. The Page component provides a consistent layout structure with header, optional sidebar, and main content area.

Sample Card Content

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

Another Card

Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

); const SampleSidebar = () => (

Sidebar Content

Quick Actions:

Additional sidebar information and links can go here.

); const SampleControl = () => (
); const SampleNavigation = () => ( ); export const Default = () => ( ); export const WithParentLabel = () => ( ); export const WithBeta = () => ( ); export const WithDocumentation = () => ( ); export const WithDocumentationButton = () => ( console.log('Documentation button clicked') } > ); export const WithSidebarInside = () => ( } sidebarPosition="inside" > ); export const WithSidebarOutside = () => ( } sidebarPosition="outside" > ); export const WithControl = () => ( } > ); export const WithNavigation = () => ( } > ); export const CenteredHeader = () => ( ); export const NarrowWidth = () => ( ); export const WideWidth = () => ( ); export const UnboundedWidth = () => ( ); export const ComplexExample = () => ( } sidebar={} sidebarPosition="inside" navigation={} > ); export const MinimalExample = () => (

This is a minimal page with just a title and simple content.

); export const NoTitle = () => ( ); export const LongContent = () => (
{Array.from({ length: 10 }, (_, i) => (

Section {i + 1}

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.

))}
);