Skip to content

Commit

Permalink
Merge pull request #51 from kadirahq/add-display-name
Browse files Browse the repository at this point in the history
Add displayName for Button
  • Loading branch information
Muhammed Thanish authored Aug 11, 2016
2 parents 771f10c + 5398c7e commit df7e3fb
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 df7e3fb

Please sign in to comment.