diff options
author | Sebastian <sebasjm@gmail.com> | 2022-11-07 19:29:47 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2022-11-07 19:29:47 -0300 |
commit | 43c7cff75055f72c7d59a7180ae8da2554456d8d (patch) | |
tree | 40456d9ab678e366a198fb7c491b3a2beb9f5779 /packages/taler-wallet-webextension/src/mui/TextField.tsx | |
parent | 0249f57b461064520c1ab4bd144f127e4473b298 (diff) |
un-uglyfy, fix: 7442
Diffstat (limited to 'packages/taler-wallet-webextension/src/mui/TextField.tsx')
-rw-r--r-- | packages/taler-wallet-webextension/src/mui/TextField.tsx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/packages/taler-wallet-webextension/src/mui/TextField.tsx b/packages/taler-wallet-webextension/src/mui/TextField.tsx index 7c6eb40a2..ba05158fa 100644 --- a/packages/taler-wallet-webextension/src/mui/TextField.tsx +++ b/packages/taler-wallet-webextension/src/mui/TextField.tsx @@ -30,7 +30,7 @@ export interface Props { autoFocus?: boolean; color?: Colors; disabled?: boolean; - error?: boolean; + error?: string; fullWidth?: boolean; helperText?: VNode | string; id?: string; @@ -85,7 +85,12 @@ export function TextField({ <FormControl {...props}> {label && <InputLabel>{label}</InputLabel>} <Input {...props}>{children}</Input> - {helperText && <FormHelperText>{helperText}</FormHelperText>} + {helperText && ( + <FormHelperText error={props.error}>{helperText}</FormHelperText> + )} + {props.error ? ( + <FormHelperText error="true">{props.error}</FormHelperText> + ) : undefined} </FormControl> ); } |