joyent-portal/packages/ui-toolkit/src/form/usage-toggle.md

32 lines
744 B
Markdown
Raw Normal View History

```jsx
const { ToggleList } = require('./toggle');
const FormGroup = require('./group').default;
const Legend = require('./legend').default;
2017-10-12 21:15:51 +03:00
<FormGroup name="who-killed-1">
<Legend>Who killed the radio star?</Legend>
<ToggleList>
2017-10-12 21:15:51 +03:00
<Toggle value="video" checked>
Video
</Toggle>
<Toggle value="tv">TV</Toggle>
</ToggleList>
2017-10-12 21:15:51 +03:00
</FormGroup>;
```
#### Toggle > Disabled
```jsx
const { ToggleList } = require('./toggle');
const FormGroup = require('./group').default;
const Legend = require('./legend').default;
2017-10-12 21:15:51 +03:00
<FormGroup name="who-killed-2" disabled>
<Legend>Who killed the radio star?</Legend>
<ToggleList>
2017-10-12 21:15:51 +03:00
<Toggle value="video">Video</Toggle>
<Toggle value="tv">TV</Toggle>
</ToggleList>
2017-10-12 21:15:51 +03:00
</FormGroup>;
```