23 lines
822 B
JavaScript
23 lines
822 B
JavaScript
|
|
import PropTypes from 'prop-types'
|
||
|
|
import FormGroup from '@mui/material/FormGroup'
|
||
|
|
import FormControlLabel from '@mui/material/FormControlLabel'
|
||
|
|
import Switch from '@mui/material/Switch'
|
||
|
|
|
||
|
|
export default function OtomatikSwitch({tradiksyonOtomatik, setTradiksyonOtomatik, disabled}) {
|
||
|
|
const handleChange = event => {
|
||
|
|
setTradiksyonOtomatik(event.target.checked)
|
||
|
|
}
|
||
|
|
|
||
|
|
return (
|
||
|
|
<FormGroup sx={{marginTop: 2}}>
|
||
|
|
<FormControlLabel control={<Switch checked={tradiksyonOtomatik} onChange={handleChange} />} disabled={disabled} label='Traduction automatique du Français vers les autres langues' labelPlacement='top' />
|
||
|
|
</FormGroup>
|
||
|
|
)
|
||
|
|
}
|
||
|
|
|
||
|
|
OtomatikSwitch.propTypes = {
|
||
|
|
tradiksyonOtomatik: PropTypes.bool.isRequired,
|
||
|
|
setTradiksyonOtomatik: PropTypes.func.isRequired,
|
||
|
|
disabled: PropTypes.bool.isRequired
|
||
|
|
}
|