import React, { useState } from 'react'; import { Button, FormControl, FormLabel, Input, Drawer, DrawerBody, DrawerCloseButton, DrawerContent, DrawerFooter, DrawerHeader, DrawerOverlay, } from '@chakra-ui/react'; import { useTranslation } from 'react-i18next'; const MasterDrawer = ({ isOpen, onClose }) => { const [newMaster, setNewMaster] = useState({ name: '', phone: '' }); const handleSave = () => { console.log(`Сохранение мастера: ${newMaster}`); onClose(); }; const { t } = useTranslation('~', { keyPrefix: 'dry-wash.arm.master.drawer', }); return ( {t('title')} {t('inputName.label')} setNewMaster({ ...newMaster, name: e.target.value }) } placeholder={t('inputName.placeholder')} /> {t('inputPhone.label')} setNewMaster({ ...newMaster, phone: e.target.value }) } placeholder={t('inputPhone.placeholder')} /> ); }; export default MasterDrawer;