Ticket edit updates
This commit is contained in:
parent
2568547384
commit
87724bb7b8
9 changed files with 297 additions and 352 deletions
|
|
@ -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={{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue