From a6ff5eee45215effb3344cb5d631a27a7c0369aa Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Fri, 22 Sep 2023 19:34:01 +0200
Subject: refactor(components): rewrite form components

---
 src/components/atoms/forms/boolean-field.tsx | 44 ----------------------------
 1 file changed, 44 deletions(-)
 delete mode 100644 src/components/atoms/forms/boolean-field.tsx

(limited to 'src/components/atoms/forms/boolean-field.tsx')

diff --git a/src/components/atoms/forms/boolean-field.tsx b/src/components/atoms/forms/boolean-field.tsx
deleted file mode 100644
index 8f33a42..0000000
--- a/src/components/atoms/forms/boolean-field.tsx
+++ /dev/null
@@ -1,44 +0,0 @@
-import { FC, InputHTMLAttributes } from 'react';
-import styles from './boolean-field.module.scss';
-
-export type BooleanFieldProps = Omit<
-  InputHTMLAttributes<HTMLInputElement>,
-  'checked' | 'hidden' | 'name' | 'type' | 'value'
-> & {
-  /**
-   * True if the field should be checked.
-   */
-  checked: boolean;
-  /**
-   * True if the field should be visually hidden. Default: false.
-   */
-  hidden?: boolean;
-  /**
-   * Field name attribute.
-   */
-  name: string;
-  /**
-   * The input type.
-   */
-  type: 'checkbox' | 'radio';
-  /**
-   * Field name attribute.
-   */
-  value: string;
-};
-
-/**
- * BooleanField component
- *
- * Render a checkbox or a radio input type.
- */
-export const BooleanField: FC<BooleanFieldProps> = ({
-  className = '',
-  hidden = false,
-  ...props
-}) => {
-  const modifier = hidden ? 'hidden' : '';
-  const inputClass = `${styles[modifier]} ${className}`;
-
-  return <input {...props} className={inputClass} />;
-};
-- 
cgit v1.2.3

