Import repositories from gitlab
This commit is contained in:
20
next/components/articleBlock/index.jsx
Normal file
20
next/components/articleBlock/index.jsx
Normal file
@@ -0,0 +1,20 @@
|
||||
import { BlocksRenderer } from "@strapi/blocks-react-renderer";
|
||||
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 ? <BlocksRenderer content={content}/> : null}
|
||||
<Button
|
||||
type="secondary"
|
||||
as="a"
|
||||
href={link}
|
||||
target="_blank"
|
||||
>
|
||||
Lire la suite
|
||||
</Button>
|
||||
</article>
|
||||
);
|
||||
}
|
||||
17
next/components/articleBlock/style.module.scss
Normal file
17
next/components/articleBlock/style.module.scss
Normal file
@@ -0,0 +1,17 @@
|
||||
.articleBlock {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
h4 {
|
||||
margin: 1rem 0;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
a {
|
||||
margin-top: 1rem;
|
||||
align-self: flex-end;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user