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/flipping-label.tsx | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

(limited to 'src/components/molecules/forms/flipping-label.tsx')

diff --git a/src/components/molecules/forms/flipping-label.tsx b/src/components/molecules/forms/flipping-label.tsx
index ca83c6d..c85642b 100644
--- a/src/components/molecules/forms/flipping-label.tsx
+++ b/src/components/molecules/forms/flipping-label.tsx
@@ -1,6 +1,5 @@
 import { FC } from 'react';
-import Label, { LabelProps } from '../../atoms/forms/label';
-import Close from '../../atoms/icons/close';
+import { Close, Label, type LabelProps } from '../../atoms';
 import styles from './flipping-label.module.scss';
 
 export type FlippingLabelProps = Pick<
@@ -17,7 +16,7 @@ export type FlippingLabelProps = Pick<
   isActive: boolean;
 };
 
-const FlippingLabel: FC<FlippingLabelProps> = ({
+export const FlippingLabel: FC<FlippingLabelProps> = ({
   children,
   className = '',
   isActive,
@@ -26,7 +25,7 @@ const FlippingLabel: FC<FlippingLabelProps> = ({
   const wrapperModifier = isActive ? 'wrapper--active' : 'wrapper--inactive';
 
   return (
-    <Label className={`${styles.label} ${className}`} {...props}>
+    <Label {...props} className={`${styles.label} ${className}`}>
       <span className={`${styles.wrapper} ${styles[wrapperModifier]}`}>
         <span className={styles.front}>{children}</span>
         <span className={styles.back}>
@@ -36,5 +35,3 @@ const FlippingLabel: FC<FlippingLabelProps> = ({
     </Label>
   );
 };
-
-export default FlippingLabel;
-- 
cgit v1.2.3

