Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

Commit

Permalink
Merge pull request #4 from smartive-education/storybook-setup
Browse files Browse the repository at this point in the history
Storybook setup
  • Loading branch information
nschaer92 authored Nov 30, 2022
2 parents 158d180 + f518208 commit 44af377
Show file tree
Hide file tree
Showing 17 changed files with 525 additions and 12 deletions.
2 changes: 2 additions & 0 deletions .storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ module.exports = {
'@storybook/addon-links',
'@storybook/addon-essentials',
'@storybook/addon-interactions',
'@storybook/addon-a11y',
'storybook-addon-designs',
{
name: '@storybook/addon-postcss',
options: {
Expand Down
25 changes: 25 additions & 0 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'tailwindcss/tailwind.css';
import '../src/global.css';
import { customViewports } from './viewports';

export const parameters = {
actions: { argTypesRegex: '^on[A-Z].*' },
Expand All @@ -9,4 +10,28 @@ export const parameters = {
date: /Date$/,
},
},
backgrounds: {
default: 'background',
values: [
{
name: 'surface',
value: '#ffffff',
},
{
name: 'background',
value: '#f1f5f9', // bg-slate-100
},
],
grid: {
disable: true,
},
},
viewport: {
viewports: customViewports,
},
options: {
storySort: {
order: ['Foundation', 'Components'],
},
},
};
37 changes: 37 additions & 0 deletions .storybook/viewports.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
export const customViewports = {
sm: {
name: 'sm',
styles: {
width: '640px',
height: '960px',
},
},
md: {
name: 'md',
styles: {
width: '768px',
height: '960px',
},
},
lg: {
name: 'lg',
styles: {
width: '1024px',
height: '960px',
},
},
xl: {
name: 'xl',
styles: {
width: '1280px',
height: '960px',
},
},
xxl: {
name: '2xl',
styles: {
width: '1536px',
height: '960px',
},
},
};
Loading

0 comments on commit 44af377

Please sign in to comment.