UNPKG

518 BJavaScriptView Raw
1import React from 'react';
2
3const buttonStyles = {
4 border: '1px solid #eee',
5 borderRadius: 3,
6 backgroundColor: '#FFFFFF',
7 cursor: 'pointer',
8 fontSize: 15,
9 padding: '3px 10px',
10};
11
12const Button = ({ children, onClick, style = {} }) => (
13 <button
14 style={{ ...buttonStyles, ...style }}
15 onClick={onClick}
16 >
17 {children}
18 </button>
19);
20
21Button.propTypes = {
22 children: React.PropTypes.string.isRequired,
23 onClick: React.PropTypes.func,
24 style: React.PropTypes.object,
25};
26
27export default Button;