Skip to content

Commit

Permalink
fix(controls): remove the flatten options type. Refs storybookjs#11003
Browse files Browse the repository at this point in the history
  • Loading branch information
matheo committed Jun 2, 2020
1 parent 29a13f6 commit 9c24f1f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
7 changes: 3 additions & 4 deletions addons/docs/src/frameworks/common/enhanceArgTypes.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,18 +136,17 @@ describe('enhanceArgTypes', () => {
it('options', () => {
expect(
enhance({
argType: { control: { type: 'options', options: [1, 2], controlType: 'radio' } },
argType: { control: { type: 'radio', options: [1, 2] } },
}).input
).toMatchInlineSnapshot(`
{
"name": "input",
"control": {
"type": "options",
"type": "radio",
"options": [
1,
2
],
"controlType": "radio"
]
}
}
`);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export const FooBar = ({ foo, bar, baz } = {}) => (
argTypes={{
count: { control: { type: 'range', min: 0, max: 10 } },
label: {
control: { type: 'options', options: ['apple', 'banana', 'cherry'] },
control: { type: 'select', options: ['apple', 'banana', 'cherry'] },
},
background: { control: { type: 'color' } },
}}
Expand Down
2 changes: 1 addition & 1 deletion examples/vue-cli/src/button/Button.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ export const ButtonWithProps = (args: any) => ({
},
});
ButtonWithProps.argTypes = {
size: { control: { type: 'options', options: ButtonSizes } },
size: { control: { type: 'select', options: ButtonSizes } },
};

0 comments on commit 9c24f1f

Please sign in to comment.