Skip to content

Commit

Permalink
Merge pull request #7645 from christianliebel/patch-2
Browse files Browse the repository at this point in the history
Knobs documentation: add missing groupId parameter demos
  • Loading branch information
shilman committed Aug 13, 2019
1 parent c546a7c commit 81b3902
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions addons/knobs/README.md
Expand Up @@ -323,8 +323,9 @@ const options = {
Watermelon: 'watermelon',
};
const defaultValue = 'kiwi';
const groupId = 'GROUP-ID1';

const value = radios(label, options, defaultValue);
const value = radios(label, options, defaultValue, groupId);
```

### options
Expand All @@ -344,8 +345,9 @@ const defaultValue = 'kiwi';
const optionsObj = {
display: 'inline-radio'
};
const groupId = 'GROUP-ID1';

const value = options(label, valuesObj, defaultValue, optionsObj);
const value = options(label, valuesObj, defaultValue, optionsObj, groupId);
```
> The display property for `optionsObj` accepts:
> - `radio`
Expand All @@ -365,8 +367,9 @@ import { files } from '@storybook/addon-knobs';
const label = 'Images';
const accept = '.xlsx, .pdf';
const defaultValue = [];
const groupId = 'GROUP-ID1';

const value = files(label, accept, defaultValue);
const value = files(label, accept, defaultValue, groupId);
```

> You can optionally specify a [list of file types](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#accept) which the file input should accept.
Expand Down

0 comments on commit 81b3902

Please sign in to comment.