diff --git a/addons/docs/src/frameworks/react/__testfixtures__/8279-js-styled-docgen/docgen.snapshot b/addons/docs/src/frameworks/react/__testfixtures__/8279-js-styled-docgen/docgen.snapshot new file mode 100644 index 000000000000..670ab38ca25b --- /dev/null +++ b/addons/docs/src/frameworks/react/__testfixtures__/8279-js-styled-docgen/docgen.snapshot @@ -0,0 +1,24 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`react component properties 8279-js-styled-docgen 1`] = ` +"import styled from 'styled-components'; +import PropTypes from 'prop-types'; +/** + * Use \`A\` to provide a regular link + */ + +const A = styled('a')({ + margin: '8px 0', + outline: 'none' +}); +A.displayName = 'Link'; +A.defaultProps = { + children: 'This is a link' +}; +A.propTypes = { + /** That should be the clickable element */ + children: PropTypes.node.isRequired +}; +export default A; +export const component = A;" +`; diff --git a/addons/docs/src/frameworks/react/__testfixtures__/8279-js-styled-docgen/input.js b/addons/docs/src/frameworks/react/__testfixtures__/8279-js-styled-docgen/input.js new file mode 100644 index 000000000000..95cf14f635c8 --- /dev/null +++ b/addons/docs/src/frameworks/react/__testfixtures__/8279-js-styled-docgen/input.js @@ -0,0 +1,23 @@ +import styled from 'styled-components'; +import PropTypes from 'prop-types'; + +/** + * Use `A` to provide a regular link + */ +const A = styled('a')({ + margin: '8px 0', + outline: 'none', +}); + +A.displayName = 'Link'; +A.defaultProps = { + children: 'This is a link', +}; + +A.propTypes = { + /** That should be the clickable element */ + children: PropTypes.node.isRequired, +}; +export default A; + +export const component = A; diff --git a/addons/docs/src/frameworks/react/__testfixtures__/8279-js-styled-docgen/properties.snapshot b/addons/docs/src/frameworks/react/__testfixtures__/8279-js-styled-docgen/properties.snapshot new file mode 100644 index 000000000000..b429f083fcc0 --- /dev/null +++ b/addons/docs/src/frameworks/react/__testfixtures__/8279-js-styled-docgen/properties.snapshot @@ -0,0 +1,7 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`react component properties 8279-js-styled-docgen 1`] = ` +Object { + "rows": Array [], +} +`; diff --git a/addons/docs/src/frameworks/react/react-properties.stories.tsx b/addons/docs/src/frameworks/react/react-properties.stories.tsx index a6534783ceae..048c37baceff 100644 --- a/addons/docs/src/frameworks/react/react-properties.stories.tsx +++ b/addons/docs/src/frameworks/react/react-properties.stories.tsx @@ -12,6 +12,7 @@ const fixtures = [ '9668-js-proptypes-no-jsdoc', '8143-ts-react-fc-generics', '8143-ts-imported-types', + '8279-js-styled-docgen', ]; const stories = storiesOf('Properties/React', module);