Files
fefan/next/components/articleBlock/index.jsx
Julien Aldon fa3793a181
All checks were successful
Deploy Fefan / deploy (push) Successful in 4m40s
add(blockRenderer): add blockRenderer component to add link open to a new page
2026-04-21 15:44:01 +02:00

22 lines
530 B
JavaScript

import BlockRenderer from '@/components/blockRenderer';
import Button from '../button';
import styles from './style.module.scss';
export default function ArticleBlock({
title,
content,
link,
className,
...props
}) {
return (
<article {...props} className={`${styles.articleBlock} ${className ?? ''}`}>
<h4>{title}</h4>
{content ? <BlockRenderer content={content} /> : null}
<Button type="secondary" as="a" href={link} target="_blank">
Lire la suite
</Button>
</article>
);
}