Skip to content

Commit

Permalink
fix: fix storybook meta declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
AssisrMatheus committed Oct 30, 2023
1 parent 47d3e6c commit cca1d39
Show file tree
Hide file tree
Showing 32 changed files with 1,825 additions and 2,216 deletions.
3,574 changes: 1,567 additions & 2,007 deletions package-lock.json

Large diffs are not rendered by default.

22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,16 +116,16 @@
"devDependencies": {
"@commitlint/cli": "^11.0.0",
"@commitlint/config-conventional": "^11.0.0",
"@storybook/addon-a11y": "^7.4.5",
"@storybook/addon-actions": "^7.4.5",
"@storybook/addon-essentials": "^7.4.5",
"@storybook/addon-links": "^7.4.5",
"@storybook/addon-styling-webpack": "^0.0.4",
"@storybook/addons": "^7.4.5",
"@storybook/nextjs": "^7.4.5",
"@storybook/react": "^7.4.5",
"@storybook/addon-a11y": "^7.5.2",
"@storybook/addon-actions": "^7.5.2",
"@storybook/addon-essentials": "^7.5.2",
"@storybook/addon-links": "^7.5.2",
"@storybook/addon-styling-webpack": "^0.0.5",
"@storybook/addons": "^7.5.2",
"@storybook/nextjs": "^7.5.2",
"@storybook/react": "^7.5.2",
"@storybook/storybook-deployer": "^2.8.16",
"@storybook/theming": "^7.4.5",
"@storybook/theming": "^7.5.2",
"@types/react": "^18.0.21",
"@types/react-dom": "^18.0.6",
"@typescript-eslint/eslint-plugin": "^4.14.1",
Expand All @@ -140,7 +140,7 @@
"eslint-plugin-prettier": "^3.3.1",
"eslint-plugin-react": "^7.22.0",
"eslint-plugin-react-hooks": "^4.2.0",
"eslint-plugin-storybook": "^0.6.14",
"eslint-plugin-storybook": "^0.6.15",
"formik": "^2.2.9",
"html-webpack-plugin": "^5.5.0",
"http-server": "^0.12.3",
Expand All @@ -152,7 +152,7 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-syntax-highlighter": "^15.5.0",
"storybook": "^7.4.5",
"storybook": "^7.5.2",
"storybook-addon-jsx": "^7.3.14",
"style-loader": "^3.3.3",
"stylelint": "^13.9.0",
Expand Down
12 changes: 7 additions & 5 deletions src/components/Gap/Gap.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,17 @@ export default {
title: 'Components/Gap',
argTypes: {
size: {
defaultValue: '2',
options: marginPaddingOptions,
control: {
type: 'select',
options: marginPaddingOptions
type: 'select'
}
},
horizontal: {
defaultValue: false,
control: {
type: 'boolean'
}
},
vertical: {
defaultValue: false,
control: {
type: 'boolean'
}
Expand All @@ -31,6 +28,11 @@ export default {
type: 'text'
}
}
},
args: {
size: '2',
horizontal: false,
vertical: false
}
} as Meta;

Expand Down
13 changes: 8 additions & 5 deletions src/components/Grid/Grid.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,26 @@ export default {
title: 'Components/Grid',
argTypes: {
columns: {
defaultValue: '4',
options: gridColumnOptions,
control: {
type: 'select',
options: gridColumnOptions
type: 'select'
}
},
rows: {
options: gridRowOptions,
control: {
type: 'select',
options: gridRowOptions
type: 'select'
}
},
className: {
control: {
type: 'text'
}
}
},
args: {
columns: '4',
rows: undefined
}
} as Meta;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ export default {
component: HTMLParsedContent,
argTypes: {
content: {
defaultValue: htmlContent,
control: {
type: 'text'
}
Expand All @@ -53,6 +52,9 @@ export default {
type: 'text'
}
}
},
args: {
content: htmlContent
}
} as Meta;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,22 @@ export default {
title: 'Components/ResizeablePanel/Horizontal',
component: HorizontalResizeablePanel,
argTypes: {
resizeRight: {
defaultValue: true
},
width: {
defaultValue: '1/4',
options: widthHeightOptions,
control: {
type: 'select',
options: widthHeightOptions
type: 'select'
}
},
height: {
defaultValue: 'screen',
options: widthHeightOptions,
control: {
type: 'select',
options: widthHeightOptions
type: 'select'
}
},
backgroundColor: {
defaultValue: 'pui-primary',
options: colorOptions,
control: {
type: 'select',
options: colorOptions
type: 'select'
}
},
className: {
Expand All @@ -40,6 +34,12 @@ export default {
},
onResize: { action: 'onResize' },
onResizeChange: { action: 'onResizeChange' }
},
args: {
resizeRight: true,
width: '1/4',
height: 'screen',
backgroundColor: 'pui-primary'
}
} as Meta;

Expand Down
18 changes: 10 additions & 8 deletions src/components/Icons/Icons.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,30 +13,32 @@ export default {
title: 'Components/Icons',
argTypes: {
icon: {
defaultValue: iconOptions[0],
options: iconOptions,
control: {
type: 'select',
options: iconOptions
type: 'select'
}
},
size: {
options: widthHeightOptions,
control: {
type: 'select',
options: widthHeightOptions
type: 'select'
}
},
color: {
defaultValue: 'pui-primary',
options: colorOptions,
control: {
type: 'select',
options: colorOptions
type: 'select'
}
},
className: {
control: {
type: 'text'
}
}
},
args: {
icon: iconOptions[0],
color: 'pui-primary'
}
} as Meta;

Expand Down
11 changes: 6 additions & 5 deletions src/components/ImageLoader/ImageLoader.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ import { ImageLoader, ImageLoaderProps } from '.';
export default {
title: 'Components/Loaders/ImageLoader',
component: ImageLoader,
argTypes: {
src: { defaultValue: 'https://cataas.com/cat' },
alt: { defaultValue: 'An image of a cat' },
className: { defaultValue: 'w-64 h-64 object-cover' },
loaderClassName: { defaultValue: 'w-64 h-64' }
argTypes: {},
args: {
src: 'https://cataas.com/cat',
alt: 'An image of a cat',
className: 'w-64 h-64 object-cover',
loaderClassName: 'w-64 h-64'
}
} as Meta;

Expand Down
8 changes: 5 additions & 3 deletions src/components/LineClamp/LineClamp.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,19 @@ export default {
title: 'Components/LineClamp',
argTypes: {
lineClamp: {
defaultValue: '3',
options: clampOptions,
control: {
type: 'select',
options: clampOptions
type: 'select'
}
},
className: {
control: {
type: 'text'
}
}
},
args: {
lineClamp: '3'
}
} as Meta;

Expand Down
8 changes: 5 additions & 3 deletions src/components/Link/Link.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,19 @@ export default {
title: 'Components/Link',
argTypes: {
color: {
defaultValue: 'pui-primary',
options: colorOptions,
control: {
type: 'select',
options: colorOptions
type: 'select'
}
},
className: {
control: {
type: 'text'
}
}
},
args: {
color: 'pui-primary'
}
} as Meta;

Expand Down
12 changes: 7 additions & 5 deletions src/components/ListConnector/ListConnector.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,19 @@ export default {
title: 'Components/ListConnector',
argTypes: {
color: {
defaultValue: 'pui-primary',
options: colorOptions,
control: {
type: 'select',
options: colorOptions
type: 'select'
}
},
className: {
control: {
type: 'text'
}
}
},
args: {
color: 'pui-primary'
}
} as Meta;

Expand Down Expand Up @@ -64,8 +66,8 @@ FlatBottom.args = {
showIcon: true
};

export const noRounded = Template.bind({});
noRounded.args = {
export const NoRounded = Template.bind({});
NoRounded.args = {
borders: 'noRounded',
showIcon: true
};
34 changes: 16 additions & 18 deletions src/components/Modal/Modal.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,52 +11,50 @@ export default {
component: Modal,
parameters: { layout: 'fullscreen' },
argTypes: {
isOpen: {
defaultValue: true
},
title: {
defaultValue: 'This is my modal'
},
size: {
defaultValue: '2/5vw',
options: minWidthOptions,
control: {
type: 'select',
options: minWidthOptions
type: 'select'
}
},
position: {
defaultValue: 'default',
options: ['default', 'center'],
control: {
type: 'select',
options: ['default', 'center']
type: 'select'
}
},
isClosable: {
defaultValue: true,
control: {
type: 'boolean'
}
},
removePadding: {
defaultValue: false,
control: {
type: 'boolean'
}
},
variant: {
defaultValue: 'default',
options: ['default', 'new'],
control: {
type: 'select',
options: ['default', 'new']
type: 'select'
}
},
content: {
defaultValue: 'A modal content',
control: {
type: 'text'
}
},
onToggleCallback: { action: 'onToggle' }
},
args: {
isOpen: true,
title: 'This is my modal',
size: '2/5vw',
position: 'default',
isClosable: true,
removePadding: false,
variant: 'default',
content: 'A modal content'
}
} as Meta;

Expand Down
Loading

0 comments on commit cca1d39

Please sign in to comment.