From 6ca7591a253ff6e4919a25e170959e518f8cd0b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20FAMIBELLE-PRONZOLA?= Date: Sun, 27 Mar 2022 02:16:32 +0400 Subject: [PATCH] Create OtomatikSwitch component --- components/soumet/otomatik-switch.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 components/soumet/otomatik-switch.js diff --git a/components/soumet/otomatik-switch.js b/components/soumet/otomatik-switch.js new file mode 100644 index 0000000..8b0f37f --- /dev/null +++ b/components/soumet/otomatik-switch.js @@ -0,0 +1,22 @@ +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 ( + + } disabled={disabled} label='Traduction automatique du Français vers les autres langues' labelPlacement='top' /> + + ) +} + +OtomatikSwitch.propTypes = { + tradiksyonOtomatik: PropTypes.bool.isRequired, + setTradiksyonOtomatik: PropTypes.func.isRequired, + disabled: PropTypes.bool.isRequired +}