import { ImageListItemStoryblok, ImageListStoryblok } from '../typings/generated/components-schema' import { storyImageList, storyImageListItem } from '../storybook/core/section' import { LmImageList } from '../components/BaseComponents' import { getComponentArgTypes } from '../storybook/configControls' import { Meta, Story } from '@storybook/react' import { LmImageListProps } from '../components/image-list/imageListTypes' const body: ImageListItemStoryblok[] = [ { _uid: '1', component: 'image_list_item', source: 'https://a.storyblok.com/f/57008/5000x3334/bae4d23fcf/amsterdam-retouch.png', label: 'First image' }, { _uid: '2', component: 'image_list_item', source: 'https://a.storyblok.com/f/57008/4541x2202/dc46a24330/bicycles-608747.jpg', label: 'Second image' }, { _uid: '232', component: 'image_list_item', source: 'https://a.storyblok.com/f/57008/5000x3334/bae4d23fcf/amsterdam-retouch.png', label: 'First image' }, { _uid: 'fdldis', component: 'image_list_item', source: 'https://a.storyblok.com/f/57008/4541x2202/dc46a24330/bicycles-608747.jpg', label: 'Second image' }, { _uid: 'eferrs', component: 'image_list_item', source: 'https://a.storyblok.com/f/57008/4541x2202/dc46a24330/bicycles-608747.jpg', label: 'Second image' } ] const content: ImageListStoryblok = { _uid: '123', component: 'image_list', body } const content2: ImageListStoryblok = { _uid: '123', component: 'image_list', body, enable_lightbox: true } const content3: ImageListStoryblok = { _uid: '123', component: 'image_list', body, enable_lightbox: true, text_protection: true } const content4: ImageListStoryblok = { _uid: '123', component: 'image_list', body, enable_lightbox: true } // eslint-disable-next-line import/no-anonymous-default-export export default { title: 'Design/Layout/Image List', component: LmImageList, argTypes: { ...getComponentArgTypes('image_list') } } as Meta const Template: Story = (args) => ( ) export const Core = Template.bind({}) Core.args = { ...content } export const Basic = () => ( <>

Gap of 32

) Basic.parameters = { // Sets the delay for a specific story. chromatic: { delay: 10000 } } export const WithLightbox = () => WithLightbox.parameters = { // Sets the delay for a specific story. chromatic: { delay: 10000 } } export const WithImageProtect = () => WithImageProtect.parameters = { // Sets the delay for a specific story. chromatic: { delay: 10000 } } export const ImageRatio = () => ( <>

Masonry

Default aspect ratio

Default 4x3

Default 3x4

Default 16x9

Default 2x3

Default 3x2

Default 1x1

Fit in color:

) ImageRatio.parameters = { // Sets the delay for a specific story. chromatic: { delay: 10000 } } export const Playground = () => (
) Playground.parameters = { // Sets the delay for a specific story. chromatic: { delay: 10000 } }