@storybook/addon-controls 6.3.0-rc.6 → 6.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -13
- package/package.json +8 -8
package/README.md
CHANGED
|
@@ -48,7 +48,7 @@ If you are somehow tied to knobs or prefer the knobs interface, we are happy to
|
|
|
48
48
|
|
|
49
49
|
### How do I migrate from addon-knobs?
|
|
50
50
|
|
|
51
|
-
If you're already using [Storybook Knobs](https://github.com/storybookjs/storybook/tree/
|
|
51
|
+
If you're already using [Storybook Knobs](https://github.com/storybookjs/storybook/tree/main/addons/knobs) you should consider migrating to Controls.
|
|
52
52
|
|
|
53
53
|
You're probably using it for something that can be satisfied by one of the cases [described above](#writing-stories).
|
|
54
54
|
|
|
@@ -90,7 +90,7 @@ export const Reflow = () => {
|
|
|
90
90
|
</>
|
|
91
91
|
);
|
|
92
92
|
};
|
|
93
|
-
```
|
|
93
|
+
```
|
|
94
94
|
|
|
95
95
|
And again, as above, this can be rewritten using [fully custom args](https://storybook.js.org/docs/react/essentials/controls#fully-custom-args):
|
|
96
96
|
|
|
@@ -98,24 +98,24 @@ And again, as above, this can be rewritten using [fully custom args](https://sto
|
|
|
98
98
|
export const Reflow = ({ count, label, ...args }) => (
|
|
99
99
|
<>
|
|
100
100
|
{[...Array(count)].map((_, i) => (
|
|
101
|
-
|
|
101
|
+
<Button key={i} label={`${label} ${i}`} {...args} />
|
|
102
102
|
))}
|
|
103
103
|
</>
|
|
104
104
|
);
|
|
105
105
|
|
|
106
|
-
Reflow.args = {
|
|
107
|
-
count: 3,
|
|
108
|
-
label: 'reflow'
|
|
106
|
+
Reflow.args = {
|
|
107
|
+
count: 3,
|
|
108
|
+
label: 'reflow',
|
|
109
109
|
};
|
|
110
110
|
|
|
111
111
|
Reflow.argTypes = {
|
|
112
|
-
count: {
|
|
113
|
-
control: {
|
|
114
|
-
type: 'range',
|
|
115
|
-
min: 0,
|
|
116
|
-
max: 20
|
|
117
|
-
}
|
|
118
|
-
}
|
|
112
|
+
count: {
|
|
113
|
+
control: {
|
|
114
|
+
type: 'range',
|
|
115
|
+
min: 0,
|
|
116
|
+
max: 20,
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
119
|
};
|
|
120
120
|
```
|
|
121
121
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/addon-controls",
|
|
3
|
-
"version": "6.3.0
|
|
3
|
+
"version": "6.3.0",
|
|
4
4
|
"description": "Interact with component inputs dynamically in the Storybook UI",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"addon",
|
|
@@ -45,12 +45,12 @@
|
|
|
45
45
|
"prepare": "node ../../scripts/prepare.js"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@storybook/addons": "6.3.0
|
|
49
|
-
"@storybook/api": "6.3.0
|
|
50
|
-
"@storybook/client-api": "6.3.0
|
|
51
|
-
"@storybook/components": "6.3.0
|
|
52
|
-
"@storybook/node-logger": "6.3.0
|
|
53
|
-
"@storybook/theming": "6.3.0
|
|
48
|
+
"@storybook/addons": "6.3.0",
|
|
49
|
+
"@storybook/api": "6.3.0",
|
|
50
|
+
"@storybook/client-api": "6.3.0",
|
|
51
|
+
"@storybook/components": "6.3.0",
|
|
52
|
+
"@storybook/node-logger": "6.3.0",
|
|
53
|
+
"@storybook/theming": "6.3.0",
|
|
54
54
|
"core-js": "^3.8.2",
|
|
55
55
|
"ts-dedent": "^2.0.0"
|
|
56
56
|
},
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"publishConfig": {
|
|
70
70
|
"access": "public"
|
|
71
71
|
},
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "9a381339dee8faf13933265cf2600577ca2c20e8",
|
|
73
73
|
"sbmodern": "dist/modern/register.js",
|
|
74
74
|
"storybook": {
|
|
75
75
|
"displayName": "Controls",
|