From 692c79024c0902989f02ea98bfc5ba8df23f0c18 Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Thu, 21 Nov 2024 12:16:46 +0800 Subject: [PATCH] Add hideErrorText prop to CustomThreshold --- .../CreateMonitor/CustomThreshold/index.jsx | 116 +++++++++--------- 1 file changed, 58 insertions(+), 58 deletions(-) diff --git a/Client/src/Pages/Infrastructure/CreateMonitor/CustomThreshold/index.jsx b/Client/src/Pages/Infrastructure/CreateMonitor/CustomThreshold/index.jsx index 3cdde1bdb..3b664eb5d 100644 --- a/Client/src/Pages/Infrastructure/CreateMonitor/CustomThreshold/index.jsx +++ b/Client/src/Pages/Infrastructure/CreateMonitor/CustomThreshold/index.jsx @@ -4,9 +4,8 @@ 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 + * `CustomThreshold` is a functional React component that displays a * group of CheckBox with a label and its correspondant threshold input field. * * @param {{ checkboxId: any; checkboxLabel: any; onCheckboxChange: any; fieldId: any; onFieldChange: any; onFieldBlur: any; alertUnit: any; infrastructureMonitor: any; errors: any; }} param0 @@ -20,64 +19,65 @@ import PropTypes from "prop-types"; * @param {object} param0.infrastructureMonitor the form object of the create infrastrcuture monitor page * @param {object} param0.errors the object that holds all the errors of the form page * @returns A compound React component that renders the custom threshold alert section - * + * */ export const CustomThreshold = ({ - checkboxId, - checkboxLabel, - onCheckboxChange, - fieldId, - onFieldChange, - onFieldBlur, - alertUnit, - infrastructureMonitor, - errors -}) => - { - const theme = useTheme(); - return ( - - - - - - - - {alertUnit} - - - -)} + checkboxId, + checkboxLabel, + onCheckboxChange, + fieldId, + onFieldChange, + onFieldBlur, + alertUnit, + infrastructureMonitor, + errors, +}) => { + const theme = useTheme(); + return ( + + + + + + + + {alertUnit} + + + + ); +}; CustomThreshold.propTypes = { checkboxId: PropTypes.string.isRequired, @@ -89,4 +89,4 @@ CustomThreshold.propTypes = { alertUnit: PropTypes.string.isRequired, infrastructureMonitor: PropTypes.object.isRequired, errors: PropTypes.object.isRequired, -}; \ No newline at end of file +};