mirror of
https://github.com/fleetdm/fleet
synced 2026-05-24 09:28:54 +00:00
35 lines
708 B
React
35 lines
708 B
React
|
|
import React, { Component, PropTypes } from 'react';
|
||
|
|
import radium from 'radium';
|
||
|
|
import componentStyles from './styles';
|
||
|
|
|
||
|
|
class GradientButton extends Component {
|
||
|
|
static propTypes = {
|
||
|
|
disabled: PropTypes.bool,
|
||
|
|
onClick: PropTypes.func,
|
||
|
|
style: PropTypes.object,
|
||
|
|
text: PropTypes.string,
|
||
|
|
type: PropTypes.string,
|
||
|
|
};
|
||
|
|
|
||
|
|
static defaultProps = {
|
||
|
|
style: {},
|
||
|
|
};
|
||
|
|
|
||
|
|
render () {
|
||
|
|
const { disabled, onClick, style, text, type } = this.props;
|
||
|
|
|
||
|
|
return (
|
||
|
|
<button
|
||
|
|
disabled={disabled}
|
||
|
|
onClick={onClick}
|
||
|
|
style={[componentStyles(disabled), style]}
|
||
|
|
type={type}
|
||
|
|
>
|
||
|
|
{text}
|
||
|
|
</button>
|
||
|
|
);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
export default radium(GradientButton);
|