From f861e6a269ba9f62700776d3cd13b644a9e836d4 Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Wed, 20 Sep 2023 16:38:54 +0200
Subject: refactor: use named export for everything except pages

Next expect a default export for pages so only those components should
use default exports. Everything else should use named exports to
reduce the number of import statements.
---
 src/components/molecules/forms/labelled-field.tsx | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

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

diff --git a/src/components/molecules/forms/labelled-field.tsx b/src/components/molecules/forms/labelled-field.tsx
index 63c91fe..fca1c54 100644
--- a/src/components/molecules/forms/labelled-field.tsx
+++ b/src/components/molecules/forms/labelled-field.tsx
@@ -1,6 +1,5 @@
 import { forwardRef, ForwardRefRenderFunction } from 'react';
-import Field, { type FieldProps } from '../../atoms/forms/field';
-import Label from '../../atoms/forms/label';
+import { Field, type FieldProps, Label } from '../../atoms';
 import styles from './labelled-field.module.scss';
 
 export type LabelledFieldProps = FieldProps & {
@@ -18,12 +17,7 @@ export type LabelledFieldProps = FieldProps & {
   labelPosition?: 'left' | 'top';
 };
 
-/**
- * LabelledField component
- *
- * Render a field tied to a label.
- */
-const LabelledField: ForwardRefRenderFunction<
+const LabelledFieldWithRef: ForwardRefRenderFunction<
   HTMLInputElement,
   LabelledFieldProps
 > = (
@@ -47,4 +41,9 @@ const LabelledField: ForwardRefRenderFunction<
   );
 };
 
-export default forwardRef(LabelledField);
+/**
+ * LabelledField component
+ *
+ * Render a field tied to a label.
+ */
+export const LabelledField = forwardRef(LabelledFieldWithRef);
-- 
cgit v1.2.3

