aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/molecules/layout/card.tsx
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2022-05-23 14:07:02 +0200
committerArmand Philippot <git@armandphilippot.com>2022-05-23 16:00:13 +0200
commit34e216546151eaf8a0a3cbb0bc8b65dae4c63bf2 (patch)
treebff34f8a1dc65f0559ddf851433f242edb092824 /src/components/molecules/layout/card.tsx
parent0f8f963ba3eccd7fd94785bf7fb216b6287cec57 (diff)
refactor: reduce the number of data transformation
Diffstat (limited to 'src/components/molecules/layout/card.tsx')
-rw-r--r--src/components/molecules/layout/card.tsx22
1 files changed, 2 insertions, 20 deletions
diff --git a/src/components/molecules/layout/card.tsx b/src/components/molecules/layout/card.tsx
index e465f76..68e364a 100644
--- a/src/components/molecules/layout/card.tsx
+++ b/src/components/molecules/layout/card.tsx
@@ -1,5 +1,6 @@
import ButtonLink from '@components/atoms/buttons/button-link';
import Heading, { type HeadingLevel } from '@components/atoms/headings/heading';
+import { type Image } from '@ts/types/app';
import { FC } from 'react';
import ResponsiveImage, {
type ResponsiveImageProps,
@@ -7,25 +8,6 @@ import ResponsiveImage, {
import styles from './card.module.scss';
import Meta, { type MetaData } from './meta';
-export type Cover = {
- /**
- * The cover alternative text.
- */
- alt: string;
- /**
- * The cover height.
- */
- height: number;
- /**
- * The cover source.
- */
- src: string;
- /**
- * The cover width.
- */
- width: number;
-};
-
export type CardProps = {
/**
* Set additional classnames to the card wrapper.
@@ -34,7 +16,7 @@ export type CardProps = {
/**
* The card cover.
*/
- cover?: Cover;
+ cover?: Image;
/**
* The cover fit. Default: cover.
*/