add fact box block

This commit is contained in:
2024-07-14 19:55:40 +02:00
parent 9b7b63f679
commit 55f8062f07
19 changed files with 617 additions and 54 deletions
@@ -0,0 +1,20 @@
import { useId, useState } from "react";
import { FactBoxBlock as FactBoxBlockType } from "@/gql/graphql";
import styles from "./factBoxBlock.module.scss";
import { Blocks } from "./Blocks";
export const FactBoxBlock = ({ block }: { block: FactBoxBlockType }) => {
return (
<section
className={styles.factBox}
data-background-color={block.backgroundColor ?? ""}
>
<div className={styles.factBoxHeader}>
<span>{block.heading}</span>
</div>
<div className={styles.factBoxContent}>
<Blocks blocks={block.body} />
</div>
</section>
);
};