UNPKG

react-garden

Version:

React + TypeScript + ThreeJS app using Material UI on NextJS, Apollo Client, GraphQL + WordPress REST APIs, for ThreeD web development.. a part of the threed.ai code family.

26 lines (20 loc) 690 B
// ** React Imports import { useState } from 'react' // ** MUI Imports import Switch from '@mui/material/Switch' import FormGroup from '@mui/material/FormGroup' import FormControlLabel from '@mui/material/FormControlLabel' const SwitchesControlledUncontrolled = () => { // ** State const [checked, setChecked] = useState(false) const handleChange = event => { setChecked(event.target.checked) } return ( <FormGroup row> <FormControlLabel label='Controlled' control={<Switch checked={checked} onChange={handleChange} />} /> <FormControlLabel control={<Switch />} label='Uncontrolled' /> </FormGroup> ) } export default SwitchesControlledUncontrolled