import React, { useState } from 'react'; import { useTranslation } from 'react-i18next'; import { Button, TextInput } from '@carbon/react'; import { Close, Save } from '@carbon/react/icons'; import styles from './value-editor.scss'; interface ValueEditorProps { id: string; handleCancel: () => void; handleSave: (value: string) => void; onChange?: (event: React.ChangeEvent) => void; value: string; } const ValueEditor: React.FC = ({ id, handleCancel, handleSave, value }) => { const { t } = useTranslation(); const [tmpValue, setTmpValue] = useState(value); return ( <> ) => setTmpValue(event.target.value)} />
); }; export default ValueEditor;