grey out label if disabled (for system sensors)

This commit is contained in:
proddy
2025-11-17 12:24:58 +01:00
parent e68a3a0d3a
commit e31ebab12b

View File

@@ -21,7 +21,16 @@ const ValidatedTextField: FC<ValidatedTextFieldProps> = ({
return (
<>
<TextField error={!!errors} {...rest} aria-label="Error" />
<TextField
error={!!errors}
{...rest}
aria-label="Error"
slotProps={{
inputLabel: {
style: rest.disabled ? { color: 'grey' } : undefined
}
}}
/>
{errors?.map((e) => (
<FormHelperText key={e.message} sx={{ color: 'rgb(250, 95, 84)' }}>
{e.message}