mirror of
https://github.com/leporello-js/leporello-js
synced 2026-01-14 05:14:28 -08:00
23 lines
425 B
JavaScript
23 lines
425 B
JavaScript
|
|
import React from 'react'
|
||
|
|
import PropTypes from 'prop-types'
|
||
|
|
|
||
|
|
const Link = ({ active, children, onClick }) => (
|
||
|
|
<button
|
||
|
|
onClick={onClick}
|
||
|
|
disabled={active}
|
||
|
|
style={{
|
||
|
|
marginLeft: '4px',
|
||
|
|
}}
|
||
|
|
>
|
||
|
|
{children}
|
||
|
|
</button>
|
||
|
|
)
|
||
|
|
|
||
|
|
Link.propTypes = {
|
||
|
|
active: PropTypes.bool.isRequired,
|
||
|
|
children: PropTypes.node.isRequired,
|
||
|
|
onClick: PropTypes.func.isRequired
|
||
|
|
}
|
||
|
|
|
||
|
|
export default Link
|