diff --git a/services/frontend/src/components/global/FormElements/Toggle.tsx b/services/frontend/src/components/global/FormElements/Toggle.tsx index c30dd01..5c2f426 100644 --- a/services/frontend/src/components/global/FormElements/Toggle.tsx +++ b/services/frontend/src/components/global/FormElements/Toggle.tsx @@ -33,6 +33,10 @@ const ToggleButton = styled(Button)(({ index, total }) => ({ fontSize: 11 })); +const ButtonBorder = styled("div")` + border-right: 1px solid white; +`; + const Toggle: FunctionComponent = ( props: IToggleProps ): ReactElement => { @@ -42,23 +46,26 @@ const Toggle: FunctionComponent = ( lodash.get(formik.touched, name) && lodash.get(formik.errors, name); const value = lodash.get(formik.values, name); - const handleChange = (value: string) => () => { - formik.setFieldValue(name, value); + const handleChange = (newValue: string) => () => { + formik.setFieldValue(name, newValue === value ? "" : newValue); }; return ( {options.map((option, index) => ( - - {option.text} - + <> + + {option.text} + + {index + 1 < options.length && } + ))}