import type { Meta, StoryObj } from '@storybook/html'; import { Gallery, type GalleryOptions } from '@42/core/gallery'; import '@42/styles/gallery.css'; const PHOTOS = [ 'https://picsum.photos/id/1015/800/600', 'https://picsum.photos/id/1025/800/600', 'https://picsum.photos/id/1035/800/600', 'https://picsum.photos/id/1045/800/600', ]; const meta: Meta = { title: 'Core/Media/Gallery', tags: ['autodocs'], argTypes: { loop: { control: 'boolean' }, }, args: { loop: true }, render: (args) => { const root = document.createElement('div'); root.dataset.c42Gallery = ''; const thumbs = PHOTOS.map( (src, i) => ``, ).join(''); root.innerHTML = ` ${thumbs}
`; new Gallery(root, args); return root; }, }; export default meta; type Story = StoryObj; export const Default: Story = {};