From 782cc0a31a866519fb7c3e18a523b347d3e40238 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Mon, 30 May 2022 19:27:21 +0200 Subject: chore: replace Checkbox component with a BooleanField component Checkbox and radio buttons are working the same way so I decided to group them in a same component. --- src/components/atoms/forms/checkbox.tsx | 46 --------------------------------- 1 file changed, 46 deletions(-) delete mode 100644 src/components/atoms/forms/checkbox.tsx (limited to 'src/components/atoms/forms/checkbox.tsx') diff --git a/src/components/atoms/forms/checkbox.tsx b/src/components/atoms/forms/checkbox.tsx deleted file mode 100644 index aec97f0..0000000 --- a/src/components/atoms/forms/checkbox.tsx +++ /dev/null @@ -1,46 +0,0 @@ -import { FC, SetStateAction } from 'react'; - -export type CheckboxProps = { - /** - * One or more ids that refers to the checkbox name. - */ - 'aria-labelledby'?: string; - /** - * Add classnames to the checkbox. - */ - className?: string; - /** - * Checkbox id attribute. - */ - id: string; - /** - * Checkbox name attribute. - */ - name: string; - /** - * Callback function to set checkbox value. - */ - setValue: (value: SetStateAction) => void; - /** - * Checkbox value. - */ - value: boolean; -}; - -/** - * Checkbox component - * - * Render a checkbox type input. - */ -const Checkbox: FC = ({ value, setValue, ...props }) => { - return ( - setValue(!value)} - {...props} - /> - ); -}; - -export default Checkbox; -- cgit v1.2.3