import { graphql } from "@/gql";
import { type RichTextBlockFragment } from "@/gql/graphql";
import { RichText } from "@/components/general/RichText";
import styles from "./richTextBlock.module.scss";

const RichTextBlockFragmentDefinition = graphql(`
  fragment RichTextBlock on RichTextBlock {
    rawValue
    value
  }
`);

export const RichTextBlock = ({ block }: { block: RichTextBlockFragment }) => {
  return (
    <div className={styles.richTextBlock}>
      <RichText content={block.value} />
    </div>
  );
};
