import { Button } from '@material-ui/core'; import Input from 'component/common/Input/Input'; import React from 'react'; import { useHistory } from 'react-router-dom'; import { useStyles } from 'component/segments/SegmentFormStepOne/SegmentFormStepOne.styles'; import { SegmentFormStep } from '../SegmentForm/SegmentForm'; import { SEGMENT_NAME_ID, SEGMENT_DESC_ID, SEGMENT_NEXT_BTN_ID, } from 'utils/testIds'; interface ISegmentFormPartOneProps { name: string; description: string; setName: React.Dispatch>; setDescription: React.Dispatch>; errors: { [key: string]: string }; clearErrors: () => void; setCurrentStep: React.Dispatch>; } export const SegmentFormStepOne: React.FC = ({ children, name, description, setName, setDescription, errors, clearErrors, setCurrentStep, }) => { const history = useHistory(); const styles = useStyles(); return (

What is the segment name?

setName(e.target.value)} error={Boolean(errors.name)} errorText={errors.name} autoFocus required data-test={SEGMENT_NAME_ID} />

What is the segment description?

setDescription(e.target.value)} error={Boolean(errors.description)} errorText={errors.description} data-test={SEGMENT_DESC_ID} />
); };