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/molecules/forms/labelled-select.tsx | 66 ----------------------
 1 file changed, 66 deletions(-)
 delete mode 100644 src/components/molecules/forms/labelled-select.tsx

(limited to 'src/components/molecules/forms/labelled-select.tsx')

diff --git a/src/components/molecules/forms/labelled-select.tsx b/src/components/molecules/forms/labelled-select.tsx
deleted file mode 100644
index 300ae8a..0000000
--- a/src/components/molecules/forms/labelled-select.tsx
+++ /dev/null
@@ -1,66 +0,0 @@
-import { FC } from 'react';
-import { Label, type LabelProps, Select, type SelectProps } from '../../atoms';
-import styles from './labelled-select.module.scss';
-
-export type LabelledSelectProps = Omit<
-  SelectProps,
-  'aria-labelledby' | 'className'
-> & {
-  /**
-   * The field label.
-   */
-  label: string;
-  /**
-   * Set additional classnames to the label.
-   */
-  labelClassName?: LabelProps['className'];
-  /**
-   * The label position. Default: top.
-   */
-  labelPosition?: 'left' | 'top';
-  /**
-   * The label size.
-   */
-  labelSize?: LabelProps['size'];
-  /**
-   * Set additional classnames to the select field.
-   */
-  selectClassName?: SelectProps['className'];
-};
-
-/**
- * LabelledSelect component
- *
- * Render a select with a label.
- */
-export const LabelledSelect: FC<LabelledSelectProps> = ({
-  id,
-  label,
-  labelClassName = '',
-  labelPosition = 'top',
-  labelSize,
-  required,
-  selectClassName = '',
-  ...props
-}) => {
-  const positionModifier = `label--${labelPosition}`;
-
-  return (
-    <>
-      <Label
-        className={`${styles[positionModifier]} ${labelClassName}`}
-        htmlFor={id}
-        required={required}
-        size={labelSize}
-      >
-        {label}
-      </Label>
-      <Select
-        {...props}
-        className={selectClassName}
-        id={id}
-        required={required}
-      />
-    </>
-  );
-};
-- 
cgit v1.2.3

