Skip to content

Commit

Permalink
Props: #8279 repro
Browse files Browse the repository at this point in the history
  • Loading branch information
shilman committed Feb 14, 2020
1 parent 4129773 commit eaa147a
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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;"
`;
Original file line number Diff line number Diff line change
@@ -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;
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`react component properties 8279-js-styled-docgen 1`] = `
Object {
"rows": Array [],
}
`;
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit eaa147a

Please sign in to comment.