2018-04-05 16:29:22 +03:00
|
|
|
### Select
|
2018-02-26 14:07:30 +02:00
|
|
|
|
|
|
|
This is the standard dropdown menu to be used in forms and for multiple choice selections.
|
|
|
|
|
2017-10-11 17:56:24 +03:00
|
|
|
```jsx
|
2018-02-26 14:07:30 +02:00
|
|
|
// Name: Active
|
2017-10-31 12:03:44 +02:00
|
|
|
const React = require('react');
|
|
|
|
const { default: Select } = require('./select');
|
2018-02-26 14:07:30 +02:00
|
|
|
const { default: Label } = require('./label');
|
2017-12-15 16:09:09 +02:00
|
|
|
const { default: FormGroup } = require('./group');
|
2017-10-31 12:03:44 +02:00
|
|
|
|
2017-12-15 16:09:09 +02:00
|
|
|
<FormGroup>
|
2018-02-26 14:07:30 +02:00
|
|
|
<Label>Your location</Label>
|
2017-12-15 16:09:09 +02:00
|
|
|
<Select>
|
|
|
|
<option selected disabled>
|
|
|
|
Select a datacenter
|
|
|
|
</option>
|
|
|
|
<option>Amsterdam, EU</option>
|
|
|
|
<option>San Francisco, USA</option>
|
|
|
|
<option>Seoul, South Korea</option>
|
|
|
|
<option>Tokyo, Japan</option>
|
|
|
|
</Select>
|
2017-12-15 16:53:59 +02:00
|
|
|
</FormGroup>;
|
2017-05-18 21:21:33 +03:00
|
|
|
|
2018-02-26 14:07:30 +02:00
|
|
|
// Tab: Disabled
|
2017-10-31 12:03:44 +02:00
|
|
|
const React = require('react');
|
|
|
|
const { default: FormGroup } = require('./group');
|
|
|
|
const { default: Label } = require('./label');
|
|
|
|
const { default: Select } = require('./select');
|
2017-05-18 21:21:33 +03:00
|
|
|
|
|
|
|
<FormGroup>
|
2017-10-11 17:56:24 +03:00
|
|
|
<Label disabled>Your location</Label>
|
2017-05-18 21:21:33 +03:00
|
|
|
<Select disabled>
|
2017-10-12 21:15:51 +03:00
|
|
|
<option selected disabled>
|
|
|
|
Select Location
|
|
|
|
</option>
|
|
|
|
<option value="1">Amsterdam, EU</option>
|
2017-05-18 21:21:33 +03:00
|
|
|
<option>San Francisco, USA</option>
|
|
|
|
<option>Seoul, South Korea</option>
|
|
|
|
<option>Tokyo, Japan</option>
|
|
|
|
</Select>
|
2017-10-12 21:15:51 +03:00
|
|
|
</FormGroup>;
|
2017-05-18 21:21:33 +03:00
|
|
|
|
2018-02-26 14:07:30 +02:00
|
|
|
// Tab: Error
|
2017-10-31 12:03:44 +02:00
|
|
|
const React = require('react');
|
|
|
|
const { default: FormMeta } = require('./meta');
|
|
|
|
const { default: FormGroup } = require('./group');
|
|
|
|
const { default: Label } = require('./label');
|
2018-02-26 14:07:30 +02:00
|
|
|
const { default: Flex } = require('styled-flex-component');
|
2017-10-31 12:03:44 +02:00
|
|
|
const { default: Select } = require('./select');
|
2017-05-18 21:21:33 +03:00
|
|
|
|
2017-10-11 17:56:24 +03:00
|
|
|
<FormGroup>
|
2018-02-26 14:07:30 +02:00
|
|
|
<Flex alignCenter justifyBetween>
|
|
|
|
<Label>Your location</Label>
|
|
|
|
<FormMeta top error>
|
|
|
|
Unexpected children error!
|
|
|
|
</FormMeta>
|
|
|
|
</Flex>
|
2017-05-18 21:21:33 +03:00
|
|
|
<Select>
|
|
|
|
<option>Amsterdam, EU</option>
|
|
|
|
<option>San Francisco, USA</option>
|
|
|
|
<option>Seoul, South Korea</option>
|
|
|
|
<option>Tokyo, Japan</option>
|
|
|
|
</Select>
|
2017-10-12 21:15:51 +03:00
|
|
|
</FormGroup>;
|
|
|
|
```
|