Skip to content

Commit

Permalink
chore: simplified config
Browse files Browse the repository at this point in the history
  • Loading branch information
basilgood committed Aug 3, 2024
1 parent 6fbfbe1 commit cfccb2e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 26 deletions.
16 changes: 2 additions & 14 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -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;
5 changes: 5 additions & 0 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export default {
// ...rest of preview
//👇 Enables auto-generated documentation for all stories
tags: ['autodocs'],
};
15 changes: 3 additions & 12 deletions stories/cosmoz-image-viewer.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,7 @@ export const Basic = ({
?loop=${loop}
?show-zoom=${showZoom}
?detached-show-zoom=${detachedShowZoom}
.images=${[
'cosmos1.jpg',
'cosmos2.jpg',
]}
.images=${['cosmos1.jpg', 'cosmos2.jpg']}
></cosmoz-image-viewer>
`;

Expand All @@ -54,14 +51,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`
<cosmoz-image-viewer
show-detach
Expand Down

0 comments on commit cfccb2e

Please sign in to comment.