From f861e6a269ba9f62700776d3cd13b644a9e836d4 Mon Sep 17 00:00:00 2001 From: Armand Philippot 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/buttons/heading-button.tsx | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/components/molecules/buttons/heading-button.tsx') diff --git a/src/components/molecules/buttons/heading-button.tsx b/src/components/molecules/buttons/heading-button.tsx index cefd179..93ccdbe 100644 --- a/src/components/molecules/buttons/heading-button.tsx +++ b/src/components/molecules/buttons/heading-button.tsx @@ -1,7 +1,6 @@ import { FC, SetStateAction } from 'react'; import { useIntl } from 'react-intl'; -import Heading, { type HeadingProps } from '../../atoms/headings/heading'; -import PlusMinus from '../../atoms/icons/plus-minus'; +import { Heading, type HeadingProps, PlusMinus } from '../../atoms'; import styles from './heading-button.module.scss'; export type HeadingButtonProps = Pick & { @@ -28,7 +27,7 @@ export type HeadingButtonProps = Pick & { * * Render a button as accordion title to toggle body. */ -const HeadingButton: FC = ({ +export const HeadingButton: FC = ({ className = '', expanded, level, @@ -51,9 +50,9 @@ const HeadingButton: FC = ({ return ( ); }; - -export default HeadingButton; -- cgit v1.2.3