import { LmComponentRender as LmSection } from '@LmComponentRender' import { BackgroundStoryblok, RowStoryblok, SectionStoryblok } from '../typings/generated/components-schema' import { columns, columnsWithImage, row, rowWithImage } from '../storybook/section' import StorybookPresetsContainer from '../storybook/components/StorybookPresetsContainer' import { findPresets } from '../storybook/findStorybookPresets' import { LmSectionProps } from '../components/section/sectionTypes' const props: SectionStoryblok = { _uid: '34234', component: 'section', body: row } const backgroundItem = { _uid: '2131', component: 'background', image: 'https://a.storyblok.com/f/69529/4896x2755/95e0b03c15/img_9046.jpg' } const background: SectionStoryblok = { ...props, background: [backgroundItem] as BackgroundStoryblok[] } const rowItem = { body: columns, _uid: '34241231', component: 'row' } const columnSection: SectionStoryblok = { _uid: '2234234', component: 'section', body: [rowItem] as RowStoryblok[] } const columnSectionWithImages: SectionStoryblok = { _uid: '12312dfd', component: 'section', body: [ { body: columnsWithImage, _uid: '34241231', component: 'row' } ] as RowStoryblok[] } // eslint-disable-next-line import/no-anonymous-default-export export default { title: 'Design/Layout/Grid Sections' } const presets = findPresets('section') type TempType = LmSectionProps['content'][] let i let j const temparray: TempType[] = [] const chunk = 15 for (i = 0, j = presets.length; i < j; i += chunk) { temparray.push(presets.slice(i, i + chunk)) } export const Presets_1 = () => ( ) Presets_1.parameters = { // Sets the delay for a specific story. chromatic: { delay: 10000 } } export const Presets_2 = () => ( ) Presets_2.parameters = { // Sets the delay for a specific story. chromatic: { delay: 10000 } } export const Presets_3 = () => ( ) Presets_3.parameters = { // Sets the delay for a specific story. chromatic: { delay: 15000 } } export const Presets_4 = () => ( ) Presets_4.parameters = { // Sets the delay for a specific story. chromatic: { delay: 15000 } } export const Presets_5 = () => ( ) Presets_5.parameters = { // Sets the delay for a specific story. chromatic: { delay: 10000 } } export const ComplexWithSquare = () => ( item._uid === '41d5d05a-afc3-4322-871a-65cb7495fdb2' )} /> ) export const NegativeMargin = () => ( item._uid === '1a6e8ad3-5a21-4ad5-ac78-56616837c923' )} /> ) export const Basic = () => ( <> ) export const BasicWithBackground = () => ( <>

 

 

) export const SectionWithRow = () => ( <> {' '}

) export const SectionWithBackgroundImage = () => ( <> ) export const SectionAlignments = () => ( <>

Justify

end

space between

space evenly

space around

Alignment

start

end

center

space between

space around

stretch

)