Skip to content

Commit

Permalink
Add displayName for Button
Browse files Browse the repository at this point in the history
  • Loading branch information
thani-sh committed Aug 11, 2016
1 parent 771f10c commit 5398c7e
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions example/Button.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,14 @@ const Button = ({ disabled, label, style, onClick }) => (
</button>
);

Button.propTypes = {
label: React.PropTypes.string.isRequired,
style: React.PropTypes.object,
disabled: React.PropTypes.bool,
onClick: React.PropTypes.func,
};
Object.assign(Button, {
displayName: 'Button',
propTypes: {
label: React.PropTypes.string.isRequired,
style: React.PropTypes.object,
disabled: React.PropTypes.bool,
onClick: React.PropTypes.func,
},
});

export default Button;

0 comments on commit 5398c7e

Please sign in to comment.