-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
63 additions
and
0 deletions.
There are no files selected for viewing
47 changes: 47 additions & 0 deletions
47
addons/docs/src/frameworks/react/__testfixtures__/9399-js-proptypes-shape/docgen.snapshot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`react component properties 9399-js-proptypes-shape 1`] = ` | ||
"import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
export const Credits = ({ | ||
areas | ||
}) => React.createElement(React.Fragment, null, JSON.stringify(areas)); // https://github.com/storybookjs/storybook/issues/9399 | ||
|
||
Credits.propTypes = { | ||
areas: PropTypes.arrayOf(PropTypes.shape({ | ||
position: PropTypes.string.isRequired, | ||
names: PropTypes.arrayOf(PropTypes.string).isRequired | ||
})).isRequired | ||
}; | ||
export const component = Credits; | ||
Credits.__docgenInfo = { | ||
\\"description\\": \\"\\", | ||
\\"methods\\": [], | ||
\\"displayName\\": \\"Credits\\", | ||
\\"props\\": { | ||
\\"areas\\": { | ||
\\"type\\": { | ||
\\"name\\": \\"arrayOf\\", | ||
\\"value\\": { | ||
\\"name\\": \\"shape\\", | ||
\\"value\\": { | ||
\\"position\\": { | ||
\\"name\\": \\"string\\", | ||
\\"required\\": true | ||
}, | ||
\\"names\\": { | ||
\\"name\\": \\"arrayOf\\", | ||
\\"value\\": { | ||
\\"name\\": \\"string\\" | ||
}, | ||
\\"required\\": true | ||
} | ||
} | ||
} | ||
}, | ||
\\"required\\": true, | ||
\\"description\\": \\"\\" | ||
} | ||
} | ||
};" | ||
`; |
16 changes: 16 additions & 0 deletions
16
addons/docs/src/frameworks/react/__testfixtures__/9399-js-proptypes-shape/input.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
|
||
export const Credits = ({ areas }) => <>{JSON.stringify(areas)}</>; | ||
|
||
// https://github.com/storybookjs/storybook/issues/9399 | ||
Credits.propTypes = { | ||
areas: PropTypes.arrayOf( | ||
PropTypes.shape({ | ||
position: PropTypes.string.isRequired, | ||
names: PropTypes.arrayOf(PropTypes.string).isRequired, | ||
}) | ||
).isRequired, | ||
}; | ||
|
||
export const component = Credits; |