Skip to content

Instantly share code, notes, and snippets.

@fernandocamargo
Created January 3, 2018 12:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fernandocamargo/ecf5900651fcdda398a6dfc62e28699d to your computer and use it in GitHub Desktop.
Save fernandocamargo/ecf5900651fcdda398a6dfc62e28699d to your computer and use it in GitHub Desktop.
import PropTypes from 'prop-types';
export const component = ({ title, description }) => (
<dl>
<dt>{title}</dt>
<dd>{description}</dd>
</dl>
);
export default Object.assign(component, {
displayName: 'Whatever component',
propTypes: {
title: PropTypes.string.isRequired,
description: PropTypes.string
},
defaultProps: {
description: 'No description provided'
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment