2015-07-02 14:17:35 +03:00
|
|
|
# Button
|
|
|
|
|
|
|
|
```
|
|
|
|
var Button = require('react-toolbox/components/button');
|
|
|
|
|
|
|
|
<Button caption="Login" />
|
2015-07-07 12:38:00 +03:00
|
|
|
<Button caption="Primary" className="primary" icon="access_alarm" />
|
2015-07-21 12:24:14 +03:00
|
|
|
<Button caption="Secondary" className="accent" />
|
2015-07-02 14:17:35 +03:00
|
|
|
<Button caption="Disabled" disabled />
|
|
|
|
|
|
|
|
<Button type="circle" icon="access_alarm" />
|
2015-07-07 12:38:00 +03:00
|
|
|
<Button type="circle" icon="explore" className="primary" />
|
2015-07-21 12:24:14 +03:00
|
|
|
<Button type="circle" icon="zoom_in" className="accent" />
|
2015-07-02 14:17:35 +03:00
|
|
|
<Button type="circle" icon="input" disabled={true} />
|
|
|
|
```
|
|
|
|
|
|
|
|
## Properties
|
|
|
|
|
|
|
|
| Name | Type | Default | Description|
|
|
|
|
|:- |:-: | :- |:-|
|
|
|
|
| **caption** | String | | The text string to use for the floating label element.|
|
|
|
|
| **className** | String | | Set the class-styles of the Component.|
|
2015-07-07 12:30:22 +03:00
|
|
|
| **disabled** | Boolean | | If true, component will be disabled.|
|
|
|
|
| **icon** | String | | Default value using JSON data.|
|
|
|
|
| **loading** | Boolean | | If true, component will be disabled and show a loading animation.|
|
|
|
|
| **type** | String | "text" | Type of the component, overwrite this property if you need set a different stylesheet.|
|
2015-07-02 14:17:35 +03:00
|
|
|
|
|
|
|
## Methods
|
|
|
|
|
|
|
|
#### loading
|
|
|
|
If true, component will be disabled and show a loading animation.
|
|
|
|
|
|
|
|
```
|
|
|
|
input_instance.loading(true);
|
|
|
|
```
|