Skip to content

Commit

Permalink
Merge pull request #2227 from jebarjonet/fix-addon-knobs-object-propt…
Browse files Browse the repository at this point in the history
…ypes

Fix addon Knobs: add array in Object PropTypes
  • Loading branch information
Hypnosphi authored Nov 4, 2017
2 parents c2a965e + 4613dcb commit 27d4f41
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions addons/knobs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ const value = color(label, defaultValue);

### object

Allows you to get a JSON object from the user.
Allows you to get a JSON object or array from the user.

```js
import { object } from '@storybook/addon-knobs';
Expand All @@ -178,7 +178,7 @@ const value = object(label, defaultValue);
### array

Allows you to get an array from the user.
Allows you to get an array of strings from the user.

```js
import { array } from '@storybook/addon-knobs';
Expand Down
2 changes: 1 addition & 1 deletion addons/knobs/src/components/types/Object.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ ObjectType.defaultProps = {
ObjectType.propTypes = {
knob: PropTypes.shape({
name: PropTypes.string,
value: PropTypes.object,
value: PropTypes.oneOfType([PropTypes.object, PropTypes.array]),
}),
onChange: PropTypes.func,
};
Expand Down

0 comments on commit 27d4f41

Please sign in to comment.