Skip to content

Commit

Permalink
Knobs documentation: document accept argument (#7632)
Browse files Browse the repository at this point in the history
Knobs documentation: document `accept` argument
  • Loading branch information
shilman committed Jul 31, 2019
1 parent 1636daa commit fe6065c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion addons/knobs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -363,12 +363,14 @@ Allows you to get a value from a file input from the user.
import { files } from '@storybook/addon-knobs';

const label = 'Images';
const accept = '.xlsx, .pdf';
const defaultValue = [];

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

> Multiple files can be selected, and will be returned as an array of [Data URLs](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs)
> 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.
> Multiple files can be selected, and will be returned as an array of [Data URLs](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs).
### date

Expand Down

0 comments on commit fe6065c

Please sign in to comment.