Skip to content
This repository has been archived by the owner on Mar 23, 2024. It is now read-only.

Commit

Permalink
fix: 🩹 fix storybook view
Browse files Browse the repository at this point in the history
  • Loading branch information
velenyx committed Sep 23, 2023
1 parent 80be2a3 commit bf9e680
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 28 deletions.
4 changes: 2 additions & 2 deletions client/.storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { StorybookConfig } from '@storybook/nextjs';
import path from 'path';

const config: StorybookConfig = {
stories: ['../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
stories: ['../src/**/*.stories.@(js|jsx|mjs|ts|tsx|mdx)'],
staticDirs: ['../public'],
addons: [
'@storybook/addon-links',
Expand All @@ -25,7 +25,7 @@ const config: StorybookConfig = {
},
},
docs: {
autodocs: 'tag',
autodocs: true,
},
core: {
builder: '@storybook/builder-webpack5',
Expand Down
26 changes: 0 additions & 26 deletions client/.storybook/preview.ts

This file was deleted.

67 changes: 67 additions & 0 deletions client/.storybook/preview.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
import type { StoryFn } from '@storybook/react';
import '../src/app/styles/globals.scss';
import './font.scss';

export const parameters = {
actions: { argTypesRegex: '^on[A-Z].*' },
viewMode: 'docs',
previewTabs: {
canvas: {
title: 'Story',
},
},
controls: {
matchers: {
color: /(background|color)$/i,
},
},
viewport: {
viewports: {
'360': {
name: '360',
styles: {
width: '360px',
height: '780px',
},
},
'768': {
name: '768',
styles: {
width: '768px',
height: '1664px',
},
},
'1024': {
name: '1024',
styles: {
width: '1024px',
height: '576px',
},
},
'1600+': {
name: '1600+',
styles: {
width: '1600px',
height: '900px',
},
},
},
},
};

export const decorators = [
(Story: StoryFn) => (
<div
style={{
margin: 10,
display: 'flex',
justifyContent: 'start',
alignItems: 'start',
flexDirection: 'column',
gap: '20px',
}}
>
<Story />
</div>
),
];

0 comments on commit bf9e680

Please sign in to comment.