From dfd816d1891545aa8ead982b57891858f1c82bb4 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Wed, 6 Apr 2022 16:24:05 +0200 Subject: chore: add a ResponsiveImage component --- src/components/atoms/links/link.tsx | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'src/components/atoms/links/link.tsx') diff --git a/src/components/atoms/links/link.tsx b/src/components/atoms/links/link.tsx index 0a69c33..a61158f 100644 --- a/src/components/atoms/links/link.tsx +++ b/src/components/atoms/links/link.tsx @@ -3,6 +3,10 @@ import { FC } from 'react'; import styles from './link.module.scss'; type LinkProps = { + /** + * Set additional classes to the link. + */ + classes?: string; /** * True if it is an external link. Default: false. */ @@ -22,18 +26,26 @@ type LinkProps = { * * Render a link. */ -const Link: FC = ({ children, href, lang, external = false }) => { +const Link: FC = ({ + children, + classes, + href, + lang, + external = false, +}) => { + const additionalClasses = classes || ''; + return external ? ( {children} ) : ( - {children} + {children} ); }; -- cgit v1.2.3