import { UxTask } from 'App/services/UxtestingService'; import React from 'react'; import { Button, Input, Switch, Typography } from 'antd'; function StepsModal({ onAdd, onHide, editTask, typingEnabled, }: { onAdd: (step: UxTask) => void; onHide: () => void; editTask?: UxTask; typingEnabled?: boolean; }) { const [title, setTitle] = React.useState(editTask?.title ?? ''); const [description, setDescription] = React.useState(editTask?.description ?? ''); const [isAnswerEnabled, setIsAnswerEnabled] = React.useState(editTask?.allowTyping ?? typingEnabled); const save = () => { onAdd({ title: title, description: description || '', allowTyping: Boolean(isAnswerEnabled), }); onHide(); }; return (