Skip to content

Commit

Permalink
Update storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
solita-antti-mottonen committed Mar 19, 2024
1 parent bb1d30a commit 756cfe0
Show file tree
Hide file tree
Showing 5 changed files with 20,786 additions and 27,711 deletions.
20 changes: 15 additions & 5 deletions etp-front/.storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
module.exports = {
stories: ['../src/**/*.stories.js'],

addons: [
'@storybook/addon-actions/register',
'@storybook/addon-links/register',
'@storybook/addon-a11y/register',
'@storybook/addon-viewport/register'
]
'@storybook/addon-actions',
'@storybook/addon-links',
'@storybook/addon-a11y',
'@storybook/addon-viewport'
],

framework: {
name: '@storybook/svelte-webpack5',
options: {}
},

docs: {
autodocs: true
}
}
5 changes: 2 additions & 3 deletions etp-front/.storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ import { addParameters, addDecorator } from '@storybook/svelte';
import { withA11y } from '@storybook/addon-a11y';
import { setupI18n } from '@Language/i18n';

addDecorator(withA11y);
addParameters({ viewport: { defaultViewport: 'responsive' } });
export const parameters = { viewport: { defaultViewport: 'responsive' } };

const localizationDecorator = makeDecorator({
wrapper: (storyFn, context) => {
Expand All @@ -14,4 +13,4 @@ const localizationDecorator = makeDecorator({
}
});

addDecorator(localizationDecorator);
export const decorators = [localizationDecorator];
2 changes: 1 addition & 1 deletion etp-front/.storybook/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ module.exports = async ({ config, mode }) => {

config.module.rules.push({
test: /\.css$/,
loaders: [
use: [
{
loader: 'postcss-loader',
options: {
Expand Down
Loading

0 comments on commit 756cfe0

Please sign in to comment.