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/ackee-toggle.tsx | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

(limited to 'src/components/molecules/forms/ackee-toggle.tsx')

diff --git a/src/components/molecules/forms/ackee-toggle.tsx b/src/components/molecules/forms/ackee-toggle.tsx
index ba77c10..32949b2 100644
--- a/src/components/molecules/forms/ackee-toggle.tsx
+++ b/src/components/molecules/forms/ackee-toggle.tsx
@@ -1,16 +1,18 @@
 import { FC } from 'react';
 import { useIntl } from 'react-intl';
-import useLocalStorage from '../../../utils/hooks/use-local-storage';
-import useUpdateAckeeOptions, {
+import {
   type AckeeOptions,
-} from '../../../utils/hooks/use-update-ackee-options';
-import RadioGroup, {
+  useLocalStorage,
+  useUpdateAckeeOptions,
+} from '../../../utils/hooks';
+import {
+  RadioGroup,
   type RadioGroupCallback,
   type RadioGroupCallbackProps,
   type RadioGroupOption,
   type RadioGroupProps,
 } from './radio-group';
-import Tooltip, { type TooltipProps } from '../modals/tooltip';
+import { Tooltip, type TooltipProps } from '../modals/tooltip';
 
 export type AckeeToggleProps = Pick<
   RadioGroupProps,
@@ -43,7 +45,7 @@ export type AckeeToggleProps = Pick<
  *
  * Render a Toggle component to set reduce motion.
  */
-const AckeeToggle: FC<AckeeToggleProps> = ({
+export const AckeeToggle: FC<AckeeToggleProps> = ({
   defaultValue,
   storageKey,
   tooltipClassName,
@@ -126,8 +128,9 @@ const AckeeToggle: FC<AckeeToggleProps> = ({
 
   return (
     <RadioGroup
-      initialChoice={value}
+      {...props}
       kind="toggle"
+      initialChoice={value}
       legend={ackeeLabel}
       onChange={handleChange}
       options={options}
@@ -139,9 +142,6 @@ const AckeeToggle: FC<AckeeToggleProps> = ({
           className={tooltipClassName}
         />
       }
-      {...props}
     />
   );
 };
-
-export default AckeeToggle;
-- 
cgit v1.2.3

