blob: 7586344cb8fb6e141dd257451e4c37fe483cde7c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
import { cn } from "@/utils/ui";
import type React from "react";
type ProseProps = React.HTMLAttributes<HTMLElement> & {
as?: "article";
html: string;
};
function Prose({ children, html, className }: ProseProps) {
return (
<article
className={cn(
"prose prose-h2:font-semibold prose-h1:text-xl prose-a:text-blue-600 prose-p:text-justify dark:prose-invert mx-auto max-w-none",
className,
)}
>
{html ? <div dangerouslySetInnerHTML={{ __html: html }} /> : children}
</article>
);
}
export default Prose;
|