|
|
@ -97,6 +97,7 @@ class SpinnerErrorButton extends Component {
|
|
|
|
|
|
|
|
|
|
|
|
render() {
|
|
|
|
render() {
|
|
|
|
const {
|
|
|
|
const {
|
|
|
|
|
|
|
|
kind,
|
|
|
|
isSpinning,
|
|
|
|
isSpinning,
|
|
|
|
error,
|
|
|
|
error,
|
|
|
|
children,
|
|
|
|
children,
|
|
|
@ -112,7 +113,7 @@ class SpinnerErrorButton extends Component {
|
|
|
|
const showIcon = wasSuccessful || hasWarning || hasError;
|
|
|
|
const showIcon = wasSuccessful || hasWarning || hasError;
|
|
|
|
|
|
|
|
|
|
|
|
let iconName = icons.CHECK;
|
|
|
|
let iconName = icons.CHECK;
|
|
|
|
let iconKind = kinds.SUCCESS;
|
|
|
|
let iconKind = kind === kinds.PRIMARY ? kinds.DEFAULT : kinds.SUCCESS;
|
|
|
|
|
|
|
|
|
|
|
|
if (hasWarning) {
|
|
|
|
if (hasWarning) {
|
|
|
|
iconName = icons.WARNING;
|
|
|
|
iconName = icons.WARNING;
|
|
|
@ -126,6 +127,7 @@ class SpinnerErrorButton extends Component {
|
|
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<SpinnerButton
|
|
|
|
<SpinnerButton
|
|
|
|
|
|
|
|
kind={kind}
|
|
|
|
isSpinning={isSpinning}
|
|
|
|
isSpinning={isSpinning}
|
|
|
|
{...otherProps}
|
|
|
|
{...otherProps}
|
|
|
|
>
|
|
|
|
>
|
|
|
@ -154,6 +156,7 @@ class SpinnerErrorButton extends Component {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
SpinnerErrorButton.propTypes = {
|
|
|
|
SpinnerErrorButton.propTypes = {
|
|
|
|
|
|
|
|
kind: PropTypes.oneOf(kinds.all),
|
|
|
|
isSpinning: PropTypes.bool.isRequired,
|
|
|
|
isSpinning: PropTypes.bool.isRequired,
|
|
|
|
error: PropTypes.object,
|
|
|
|
error: PropTypes.object,
|
|
|
|
children: PropTypes.node.isRequired
|
|
|
|
children: PropTypes.node.isRequired
|
|
|
|