Documents for <Aside/> and <Input/>
parent
6bd095ec3c
commit
ca823ecc52
|
@ -0,0 +1,37 @@
|
|||
# Aside
|
||||
|
||||
```
|
||||
var Aside = require('react-toolbox/components/input');
|
||||
|
||||
<Aside>
|
||||
<header/>
|
||||
<section>
|
||||
<h1>Hello World</h1>
|
||||
</section>
|
||||
<footer/>
|
||||
</Aside>
|
||||
```
|
||||
|
||||
## Properties
|
||||
|
||||
| Name | Type | Default | Description|
|
||||
|:- |:-: | :- |:-|
|
||||
| **type** | String | "left" | Type of the component, overwrite this property if you need set a different stylesheet. Options: "left" or "right"|
|
||||
| **className** | String | | Sets the class-styles of the Component.|
|
||||
| **active** | Bool | false | If true, component will be show by default.|
|
||||
| **hideable** | Bool | false | If true, the componente can be hideable clicking in it.|
|
||||
|
||||
## Methods
|
||||
|
||||
#### show
|
||||
Sets the value of the input element.
|
||||
|
||||
```
|
||||
aside_instance.show();
|
||||
```
|
||||
|
||||
#### hide
|
||||
|
||||
```
|
||||
aside_instance.hide();
|
||||
```
|
|
@ -0,0 +1,48 @@
|
|||
# Input
|
||||
|
||||
```
|
||||
var Input = require('react-toolbox/components/input');
|
||||
|
||||
<Input value='Hello' required />
|
||||
<Input multiline value='Lorem ipsum...' disabled />
|
||||
<Input type='number' value='1980' label='Year of birthdate' />
|
||||
```
|
||||
|
||||
## Properties
|
||||
|
||||
| Name | Type | Default | Description|
|
||||
|:- |:-: | :- |:-|
|
||||
| **type** | String | "normal" | Type of the component, overwrite this property if you need set a different stylesheet.|
|
||||
| **label** | String | | The text string to use for the floating label element.|
|
||||
| **value** | String | | Default value using JSON data.|
|
||||
| **error** | String | | Sets the error string.|
|
||||
| **className** | String | | Sets the class-styles of the Component.|
|
||||
| **required** | Boolean | false | If true, component needs has a value.|
|
||||
| **disabled** | Boolean | false | If true, component will be disabled.|
|
||||
| **multiline** | Boolean | false | If true, a textarea element will be rendered. The textarea also grows and shrinks according to the number of lines.|
|
||||
| **onChange** | Function | | Callback function that is fired when the components's value changes.|
|
||||
| **onKeyPress** | Function | | Callback function that is fired when a key is pressed.|
|
||||
| **onFocus** | Function | | Callback function that is fired when components is focused.|
|
||||
| **onBlur** | Function | | Callback function that is fired when components is blured.|
|
||||
|
||||
## Methods
|
||||
|
||||
#### getValue
|
||||
Returns the value of the input.
|
||||
|
||||
```
|
||||
input_instance.getValue();
|
||||
```
|
||||
|
||||
#### setValue
|
||||
Sets the value of the input element.
|
||||
|
||||
```
|
||||
input_instance.setValue(newValue);
|
||||
```
|
||||
|
||||
#### setError
|
||||
|
||||
```
|
||||
input_instance.setError("Something is wrong...");
|
||||
```
|
Loading…
Reference in New Issue