Files: bd4bfedca4b0bd09f8505a662478749de1fe663f / components / button.js
437 bytesRaw
1 | import { func, string } from 'prop-types'; |
2 | |
3 | const Button = ({ children, onClick }) => ( |
4 | <button onClick={ event => onClick && onClick(event) }> |
5 | { children } |
6 | |
7 | <style jsx global>{` |
8 | button { |
9 | background: #43A047; |
10 | border: none; |
11 | border-radius: 3px; |
12 | color: #fff; |
13 | } |
14 | `}</style> |
15 | </button> |
16 | ); |
17 | |
18 | Button.propTypes = { |
19 | children: string.isRequired, |
20 | onClick: func |
21 | }; |
22 | |
23 | export default Button; |
Built with git-ssb-web