diff --git a/client/src/Components/Inputs/Radio/index.jsx b/client/src/Components/Inputs/Radio/index.jsx index 8c1c06b38..646b38e93 100644 --- a/client/src/Components/Inputs/Radio/index.jsx +++ b/client/src/Components/Inputs/Radio/index.jsx @@ -16,26 +16,27 @@ import "./index.css"; * size="small" * /> * - * @param {Object} props - The component props. - * @param {string} props.id - The id of the radio button. - * @param {string} props.title - The title of the radio button. - * @param {string} [props.desc] - The description of the radio button. - * @param {string} [props.size="small"] - The size of the radio button. + * @param {Object} props - The component + * @param {string} id - The id of the radio button. + * @param {string} title - The title of the radio button. + * @param {string} [desc] - The description of the radio button. + * @param {string} [size="small"] - The size of the radio button. * @returns {JSX.Element} - The rendered Radio component. */ -const Radio = (props) => { +const Radio = ({ name, checked, value, id, size, title, desc, onChange }) => { const theme = useTheme(); return ( } sx={{ color: "transparent", @@ -49,16 +50,16 @@ const Radio = (props) => { }} /> } - onChange={props.onChange} + onChange={onChange} label={ <> - {props.title} + {title} - {props.desc} + {desc} } @@ -81,9 +82,14 @@ const Radio = (props) => { }; Radio.propTypes = { - title: PropTypes.string.isRequired, + title: PropTypes.string, desc: PropTypes.string, size: PropTypes.string, + name: PropTypes.string, + checked: PropTypes.bool, + value: PropTypes.string, + id: PropTypes.string, + onChange: PropTypes.func, }; export default Radio; diff --git a/client/src/Pages/Uptime/Create/index.jsx b/client/src/Pages/Uptime/Create/index.jsx index 6527334ab..3db73481a 100644 --- a/client/src/Pages/Uptime/Create/index.jsx +++ b/client/src/Pages/Uptime/Create/index.jsx @@ -147,6 +147,7 @@ const CreateMonitor = () => { const onChange = (event) => { const { name, value, checked } = event.target; + let newValue = value; if (name === "ignoreTlsErrors") { newValue = checked;