27 lines
595 B
JavaScript
27 lines
595 B
JavaScript
import React from 'react';
|
|
import './Button.css';
|
|
import PropTypes from 'prop-types';
|
|
|
|
const Button = (props) => {
|
|
return (
|
|
<button
|
|
disabled={props.disabled}
|
|
autoFocus={props.autoFocus}
|
|
className={'Button'}
|
|
style={props.buttonStyles}
|
|
onClick={props.clicked}>
|
|
{props.children}
|
|
</button>
|
|
);
|
|
};
|
|
|
|
Button.propTypes = {
|
|
children: PropTypes.oneOfType([PropTypes.object, PropTypes.array, PropTypes.string]),
|
|
autoFocus: PropTypes.bool,
|
|
buttonStyles: PropTypes.object,
|
|
clicked: PropTypes.func,
|
|
disabled: PropTypes.bool,
|
|
};
|
|
|
|
export default Button;
|