aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/molecules/images/responsive-image.tsx
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2022-05-03 16:53:55 +0200
committerArmand Philippot <git@armandphilippot.com>2022-05-03 16:53:55 +0200
commitee04742d1f0645908baa30e47845126c28848f50 (patch)
tree1d80dca17437be6a351e932885e95c940833e571 /src/components/molecules/images/responsive-image.tsx
parent83a029084f1bbfd78b7099d9bea3371d4533c6d9 (diff)
chore: add a CV page
Diffstat (limited to 'src/components/molecules/images/responsive-image.tsx')
-rw-r--r--src/components/molecules/images/responsive-image.tsx6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/components/molecules/images/responsive-image.tsx b/src/components/molecules/images/responsive-image.tsx
index 31cbcd1..d07dd6c 100644
--- a/src/components/molecules/images/responsive-image.tsx
+++ b/src/components/molecules/images/responsive-image.tsx
@@ -1,6 +1,6 @@
import Link, { type LinkProps } from '@components/atoms/links/link';
import Image, { type ImageProps } from 'next/image';
-import { FC } from 'react';
+import { FC, ReactNode } from 'react';
import styles from './responsive-image.module.scss';
export type ResponsiveImageProps = Omit<
@@ -14,7 +14,7 @@ export type ResponsiveImageProps = Omit<
/**
* A figure caption.
*/
- caption?: string;
+ caption?: ReactNode;
/**
* Set additional classnames to the figure wrapper.
*/
@@ -55,6 +55,7 @@ const ResponsiveImage: FC<ResponsiveImageProps> = ({
alt={alt}
layout={layout || 'intrinsic'}
objectFit={objectFit || 'contain'}
+ className={styles.img}
{...props}
/>
{caption && (
@@ -67,6 +68,7 @@ const ResponsiveImage: FC<ResponsiveImageProps> = ({
alt={alt}
layout={layout || 'intrinsic'}
objectFit={objectFit || 'contain'}
+ className={styles.img}
{...props}
/>
{caption && (