(props)
| 2 | import { Form, FormGroup, Label, Input } from 'reactstrap'; |
| 3 | |
| 4 | function Example(props) { |
| 5 | const [state, setState] = useState(true); |
| 6 | |
| 7 | return ( |
| 8 | <Form> |
| 9 | <FormGroup switch> |
| 10 | <Input type="switch" role="switch" /> |
| 11 | <Label check>Default switch checkbox input</Label> |
| 12 | </FormGroup> |
| 13 | <FormGroup switch> |
| 14 | <Input |
| 15 | type="switch" |
| 16 | checked={state} |
| 17 | onChange={() => { |
| 18 | setState(!state); |
| 19 | }} |
| 20 | /> |
| 21 | <Label check>Checked switch checkbox input</Label> |
| 22 | </FormGroup> |
| 23 | <FormGroup switch disabled> |
| 24 | <Input type="switch" disabled /> |
| 25 | <Label check>Disabled switch checkbox input</Label> |
| 26 | </FormGroup> |
| 27 | <FormGroup switch disabled> |
| 28 | <Input type="switch" checked disabled /> |
| 29 | <Label check>Default switch checkbox input</Label> |
| 30 | </FormGroup> |
| 31 | </Form> |
| 32 | ); |
| 33 | } |
| 34 | |
| 35 | export default Example; |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…