aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/molecules/layout/card.tsx
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2023-09-20 16:38:54 +0200
committerArmand Philippot <git@armandphilippot.com>2023-09-20 16:38:54 +0200
commitf861e6a269ba9f62700776d3cd13b644a9e836d4 (patch)
treea5a107e7a6e4ff8b4261fe04349357bc00b783ee /src/components/molecules/layout/card.tsx
parent03331c44276ec56e9f235e4d5ee75030455a753f (diff)
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.
Diffstat (limited to 'src/components/molecules/layout/card.tsx')
-rw-r--r--src/components/molecules/layout/card.tsx15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/components/molecules/layout/card.tsx b/src/components/molecules/layout/card.tsx
index 50431d8..c342d0e 100644
--- a/src/components/molecules/layout/card.tsx
+++ b/src/components/molecules/layout/card.tsx
@@ -1,10 +1,9 @@
import { FC } from 'react';
-import { type Image } from '../../../types/app';
-import ButtonLink from '../../atoms/buttons/button-link';
-import Heading, { type HeadingLevel } from '../../atoms/headings/heading';
-import ResponsiveImage from '../images/responsive-image';
+import { type Image } from '../../../types';
+import { ButtonLink, Heading, type HeadingLevel } from '../../atoms';
+import { ResponsiveImage } from '../images';
+import { Meta, type MetaData } from './meta';
import styles from './card.module.scss';
-import Meta, { type MetaData } from './meta';
export type CardProps = {
/**
@@ -46,7 +45,7 @@ export type CardProps = {
*
* Render a link with minimal information about its content.
*/
-const Card: FC<CardProps> = ({
+export const Card: FC<CardProps> = ({
className = '',
cover,
id,
@@ -59,8 +58,8 @@ const Card: FC<CardProps> = ({
return (
<ButtonLink
aria-labelledby={`${id}-heading`}
- target={url}
className={`${styles.wrapper} ${className}`}
+ target={url}
>
<article className={styles.article}>
<header className={styles.header}>
@@ -91,5 +90,3 @@ const Card: FC<CardProps> = ({
</ButtonLink>
);
};
-
-export default Card;