Ticket edit updates

This commit is contained in:
Darren Clarke 2024-08-07 15:25:53 +02:00
parent 2568547384
commit 87724bb7b8
9 changed files with 297 additions and 352 deletions

View file

@ -16,6 +16,7 @@ type TextFieldProps = {
required?: boolean;
lines?: number;
helperText?: string;
updateFormState?: (field: string, value: any) => void;
};
export const TextField: FC<TextFieldProps> = ({
@ -27,6 +28,7 @@ export const TextField: FC<TextFieldProps> = ({
required = false,
lines = 1,
helperText,
updateFormState,
}) => {
const { darkMediumGray, white } = colors;
const { roboto } = fonts;
@ -42,6 +44,7 @@ export const TextField: FC<TextFieldProps> = ({
rows={lines}
required={required}
defaultValue={formState.values[name]}
onChange={(e: any) => updateFormState?.(name, e.target.value)}
error={Boolean(formState.errors[name])}
helperText={formState.errors[name] ?? helperText}
InputProps={{