import { Typography } from '@mui/material'; import type { ComponentMeta, ComponentStory } from '@storybook/react'; import SectionPanel from '.'; export default { argsType: { loading: { control: 'bolean' }, sections: { control: 'object' } }, component: SectionPanel, title: 'Panel/Section' } as ComponentMeta; interface Props { loading?; mainPanelWidth?: number; secondaryPanel?; sections; } const PanelWithHeader = ({ sections, secondaryPanel = undefined, loading = false, mainPanelWidth }: Props): JSX.Element => (
Header} loading={loading} mainPanelWidth={mainPanelWidth} onClose={(): undefined => undefined} secondaryPanel={secondaryPanel} sections={sections} />
); const sections = [ { expandable: true, id: 'first section', section: First section, title: 'First section' }, { expandable: true, id: 'second section', section: Second section, title: 'Second section' }, { expandable: true, id: 'third section', section: Third section, title: 'Third section' } ]; const moreSections = [ { expandable: true, id: 'fourth section', section: Fourth section, title: 'Fourth section' }, { expandable: true, id: 'fifth section', section: Fifth section, title: 'Fifth section' }, { expandable: true, id: 'sixth section', section: Sixth section, title: 'Sixth section' }, { expandable: true, id: 'seventh section', section: Seventh section, title: 'Seventh section' }, { expandable: true, id: 'eighth section', section: Eighth section, title: 'Eighth section' }, { expandable: true, id: 'nineth section', section: Nineth section, title: 'Nineth section' } ]; const TemplateSectionPanel: ComponentStory = (args) => ( ); export const PlaygroundSection = TemplateSectionPanel.bind({}); PlaygroundSection.args = { loading: false, sections }; export const normal = (): JSX.Element => ( ); export const withMoreSections = (): JSX.Element => ( ); export const withLoading = (): JSX.Element => ( ); export const withSecondaryPanel = (): JSX.Element => ( Secondary Panel} sections={sections} /> ); export const withCustomSecondaryPanel = (): JSX.Element => ( Secondary Panel} sections={sections} /> );