Delete loading prop from buttons
parent
2e0b9fcb5c
commit
5248f87468
|
@ -18,7 +18,6 @@ class Button extends React.Component {
|
|||
icon: React.PropTypes.string,
|
||||
inverse: React.PropTypes.bool,
|
||||
label: React.PropTypes.string,
|
||||
loading: React.PropTypes.bool,
|
||||
mini: React.PropTypes.bool,
|
||||
primary: React.PropTypes.bool,
|
||||
raised: React.PropTypes.bool,
|
||||
|
@ -33,7 +32,6 @@ class Button extends React.Component {
|
|||
className: '',
|
||||
flat: false,
|
||||
floating: false,
|
||||
loading: false,
|
||||
mini: false,
|
||||
primary: false,
|
||||
raised: false,
|
||||
|
@ -48,7 +46,7 @@ class Button extends React.Component {
|
|||
|
||||
render () {
|
||||
const {accent, className, flat, floating, href, icon, inverse, label,
|
||||
loading, mini, primary, raised, ripple,
|
||||
mini, primary, raised, ripple,
|
||||
tooltip, tooltipDelay, ...others} = this.props;
|
||||
const element = href ? 'a' : 'button';
|
||||
const level = primary ? 'primary' : accent ? 'accent' : 'neutral';
|
||||
|
@ -63,13 +61,13 @@ class Button extends React.Component {
|
|||
...others,
|
||||
href,
|
||||
className: classes,
|
||||
disabled: this.props.disabled || this.props.loading,
|
||||
disabled: this.props.disabled,
|
||||
onMouseDown: this.handleMouseDown,
|
||||
'data-react-toolbox': 'button'
|
||||
};
|
||||
|
||||
return React.createElement(element, props,
|
||||
ripple ? <Ripple ref='ripple' loading={loading}/> : null,
|
||||
ripple ? <Ripple ref='ripple' /> : null,
|
||||
tooltip ? <Tooltip className={style.tooltip} delay={tooltipDelay} label={tooltip}/> : null,
|
||||
icon ? <FontIcon className={style.icon} value={icon}/> : null,
|
||||
label ? label : this.props.children
|
||||
|
|
|
@ -42,7 +42,6 @@ const TestButtons = () => (
|
|||
| `icon` | `String` | | Value of the icon (See icon component). |
|
||||
| `inverse` | `Boolean` | | If true, the neutral colors are inverted. Useful to put a button over a dark background. |
|
||||
| `label` | `String` | | The text string to use for the name of the button.|
|
||||
| `loading` | `Boolean` | `false` | If true, component will be disabled and show a loading animation.|
|
||||
| `mini` | `Boolean` | `false` | To be used with floating button. If true the button will be smaller.|
|
||||
| `primary` | `false` | `false` | Indicates if the button should have primary color.|
|
||||
| `raised` | `Boolean` | `false` | If true, the button will have a raised look. |
|
||||
|
|
|
@ -26,7 +26,6 @@ const ButtonTest = () => (
|
|||
</IconButton>
|
||||
<Button icon='add' label='Add this' flat primary />
|
||||
<Button icon='add' label='Add this' flat disabled />
|
||||
<Button icon='bookmark' label='Bookmark' raised primary loading />
|
||||
</section>
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in New Issue