diff options
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> ); } |