Add hideErrorText prop to CustomThreshold

This commit is contained in:
Alex Holliday committed 2024-11-21 12:16:46 +08:00
1 parent 36d2a0aa85
commit 692c79024c
1 file changed
+6 -6
@@ -4,7 +4,6 @@ import Checkbox from "../../../../Components/Inputs/Checkbox";
import { useTheme } from "@emotion/react";
import PropTypes from "prop-types";
/**
* `CustomThreshold` is a functional React component that displays a
* group of CheckBox with a label and its correspondant threshold input field.
@@ -32,9 +31,8 @@ export const CustomThreshold = ({
onFieldBlur,
alertUnit,
infrastructureMonitor,
errors
}) =>
{
errors,
}) => {
const theme = useTheme();
return (
<Stack
@@ -42,7 +40,7 @@ export const CustomThreshold = ({
sx={{
width: "50%",
justifyContent: "space-between",
flexWrap: "wrap"
flexWrap: "wrap",
}}
>
<Box>
@@ -68,6 +66,7 @@ export const CustomThreshold = ({
onChange={onFieldChange}
error={errors[fieldId]}
disabled={!infrastructureMonitor[checkboxId]}
hideErrorText={true}
></Field>
<Typography
component="p"
@@ -77,7 +76,8 @@ export const CustomThreshold = ({
</Typography>
</Stack>
</Stack>
)}
);
};
CustomThreshold.propTypes = {
checkboxId: PropTypes.string.isRequired,