Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(config)!: use object parameter instead of array #10

Merged
merged 43 commits into from
Dec 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
b92bdbe
fix vulnerabilties
joanrm20 Jun 8, 2020
b27e21a
fix vulnerabilities example
joanrm20 Jun 8, 2020
fec3a78
Merge branch 'master' into paddings-object-config
joanrm20 Jun 11, 2020
d34c771
add function to normalize config
joanrm20 Jun 14, 2020
2411186
implement normalizeItems on display items
joanrm20 Jun 14, 2020
c4a8967
update PaddingConfig API types
joanrm20 Jul 15, 2020
94576af
add storybook cient logger
joanrm20 Jul 15, 2020
0e647ce
implement old config warning log
joanrm20 Jul 15, 2020
2e40067
Add validation for addon disabled
joanrm20 Jul 15, 2020
61bfe90
update normalize function and output naming
joanrm20 Jul 15, 2020
4cbde43
simplify helper usage
joanrm20 Jul 15, 2020
6b833da
normalize values for pre selection
joanrm20 Jul 15, 2020
6ea7ff0
update validations
joanrm20 Jul 15, 2020
ad424c6
update example config
joanrm20 Jul 15, 2020
3bddd2a
Merge branch 'master' into paddings-object-config
joanrm20 Jul 19, 2020
8eb552a
update deprecation message
joanrm20 Jul 19, 2020
be8d9c8
code review comments - API updates
joanrm20 Jul 21, 2020
709beb8
update api definition
joanrm20 Jul 22, 2020
63b7eb8
fix value reseting
joanrm20 Jul 25, 2020
493947a
update docs
joanrm20 Jul 25, 2020
bcdeafe
disable story for disable example
joanrm20 Jul 25, 2020
25fad7a
update docs and example
joanrm20 Aug 4, 2020
249c874
fix isEnabled type
joanrm20 Aug 4, 2020
a7eab7f
add early return to normalizeValue func
joanrm20 Aug 4, 2020
66fee1e
Merge branch 'master' into paddings-object-config
joanrm20 Sep 20, 2020
ce62d93
update to globals
joanrm20 Oct 11, 2020
314ac1a
add specific file for types
joanrm20 Oct 12, 2020
1436e27
remove core events
joanrm20 Oct 12, 2020
7a9b190
update storybook in example
joanrm20 Oct 12, 2020
f94c4d9
update storybook to latest
joanrm20 Dec 7, 2020
2919a02
update storybook deps to latest
joanrm20 Dec 7, 2020
4360cee
remove logger and update react
joanrm20 Dec 8, 2020
d6fffbe
update react in example
joanrm20 Dec 8, 2020
4eb3b3f
remove supoport for array
joanrm20 Dec 8, 2020
ef8b386
fix vulnerabilities
joanrm20 Dec 8, 2020
b016111
update watch command and exact version
joanrm20 Dec 11, 2020
ca060ea
Merge branch 'master' into paddings-object-config
joanrm20 Dec 17, 2020
9cd5e3d
Merge branch 'master' into paddings-object-config
joanrm20 Dec 21, 2020
14bc5ad
remove disable story and default param
joanrm20 Dec 23, 2020
95f2714
add react and react-dom as peer dependencies
joanrm20 Dec 25, 2020
cc532e4
add react-dom dep
joanrm20 Dec 25, 2020
9d89226
add react also as dev-dependency
joanrm20 Dec 25, 2020
4e43d93
save exact
joanrm20 Dec 26, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 17 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,14 @@ To configure for all stories, set the `paddings` parameter in [`.storybook/previ

```js
export const parameters = {
paddings: [
{ name: 'Small', value: '16px' },
{ name: 'Medium', value: '32px', default: true },
{ name: 'Large', value: '64px' },
],
paddings: {
values: [
{ name: 'Small', value: '16px' },
{ name: 'Medium', value: '32px' },
{ name: 'Large', value: '64px' },
],
default: 'Medium',
},
};
```

Expand All @@ -52,17 +55,20 @@ You can also configure on per-story or per-component basis using [parameter inhe
export default {
title: 'Button',
parameters: {
paddings: [
{ name: 'Small', value: '16px' },
{ name: 'Medium', value: '32px' },
{ name: 'Large', value: '64px', default: true },
],
paddings: {
values: [
{ name: 'Small', value: '16px' },
{ name: 'Medium', value: '32px' },
{ name: 'Large', value: '64px' },
],
default: 'Large',
},
},
joanrm20 marked this conversation as resolved.
Show resolved Hide resolved
};

// Disable addon in Button/Large story only
export const Large = Template.bind({});
Large.parameters = {
paddings: [],
paddings: { disable: true },
};
```
3 changes: 2 additions & 1 deletion example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"storybook": "start-storybook -p 6006"
},
"dependencies": {
"react": "^17.0.0"
"react": "^17.0.0",
"react-dom": "^17.0.0"
},
"devDependencies": {
"@babel/core": "^7.0.0",
Expand Down
Loading