From e078d9dfe0b7f51235b7da33c0a22ddd43d5daf2 Mon Sep 17 00:00:00 2001 From: basilgood Date: Sat, 3 Aug 2024 11:50:47 +0300 Subject: [PATCH] chore: simplified config --- .storybook/main.js | 16 ++-------------- stories/cosmoz-image-viewer.stories.js | 16 ++++------------ stories/haunted-pan-zoom.stories.js | 2 ++ 3 files changed, 8 insertions(+), 26 deletions(-) diff --git a/.storybook/main.js b/.storybook/main.js index 74cba82..1a0ca59 100644 --- a/.storybook/main.js +++ b/.storybook/main.js @@ -1,23 +1,11 @@ /** @type { import('@storybook/web-components-vite').StorybookConfig } */ -const config = { +export default { stories: ['../stories/**/*.stories.{js,ts,mdx}'], addons: ['@storybook/addon-essentials', '@storybook/addon-links'], core: { builder: '@storybook/builder-vite', disableTelemetry: true, }, - framework: { - name: '@storybook/web-components-vite', - options: {}, - }, - docs: { - autodocs: true, - defaultName: 'Docs', - }, + framework: '@storybook/web-components-vite', staticDirs: ['../stories/images'], - async viteFinal(config) { - return config; - }, }; - -export default config; diff --git a/stories/cosmoz-image-viewer.stories.js b/stories/cosmoz-image-viewer.stories.js index a68e0ee..35f3014 100644 --- a/stories/cosmoz-image-viewer.stories.js +++ b/stories/cosmoz-image-viewer.stories.js @@ -6,6 +6,7 @@ import { images } from './data.js'; export default { title: 'Cosmoz Image Viewer', component: 'cosmoz-image-viewer', + tags: ['autodocs'], }; export const Basic = ({ @@ -36,10 +37,7 @@ export const Basic = ({ ?loop=${loop} ?show-zoom=${showZoom} ?detached-show-zoom=${detachedShowZoom} - .images=${[ - 'cosmos1.jpg', - 'cosmos2.jpg', - ]} + .images=${['cosmos1.jpg', 'cosmos2.jpg']} > `; @@ -54,14 +52,8 @@ Basic.args = { }; export const Issue21 = () => { - const images1 = [ - 'stockholm.jpg', - 'strasbourg.jpg', - ], - images2 = [ - 'cosmos1.jpg', - 'cosmos2.jpg', - ]; + const images1 = ['stockholm.jpg', 'strasbourg.jpg'], + images2 = ['cosmos1.jpg', 'cosmos2.jpg']; return html` html`