| 1 | import React from 'react' |
| 2 | import PropTypes from 'prop-types' |
| 3 | |
| 4 | const Link = ({ active, children, onClick }) => ( |
| 5 | <button |
| 6 | onClick={onClick} |
| 7 | disabled={active} |
| 8 | style={{ |
| 9 | marginLeft: '4px', |
| 10 | }} |
| 11 | > |
| 12 | {children} |
| 13 | </button> |
| 14 | ) |
| 15 | |
| 16 | Link.propTypes = { |
| 17 | active: PropTypes.bool.isRequired, |
| 18 | children: PropTypes.node.isRequired, |
| 19 | onClick: PropTypes.func.isRequired |
| 20 | } |
| 21 | |
| 22 | export default Link |