mirror of
https://github.com/fleetdm/fleet
synced 2026-05-24 09:28:54 +00:00
* GradientButton components * Style guide updates * Display errors and override styles for InputFieldWithIcon * Envelope Icon * Login page form submission (#157) * API client utility * moves test helpers to the test directory * Utility to namespace local storage keys * LoginSuccessfulPage component * Check icon * adds auth to redux state * successful form submission * Allow tests to load dummy SVG static images & test fixes * ForgotPassword Page, Form & route * Email validator
34 lines
708 B
JavaScript
34 lines
708 B
JavaScript
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);
|