Files
web/components/Current/Aside/Puff/renderOptions.tsx
Michael Zetterberg 14e93eba7c chore: lint fix
2024-04-23 14:43:17 +02:00

22 lines
595 B
TypeScript

import styles from "./puff.module.css"
import type { EmbedByUid } from "@/types/components/jsontohtml"
import { RTETypeEnum } from "@/types/rte/enums"
import type { RTEDefaultNode, RTENext } from "@/types/rte/node"
import type { RenderOptions } from "@/types/rte/option"
export const renderOptions: RenderOptions = {
[RTETypeEnum.p]: (
node: RTEDefaultNode,
embeds: EmbedByUid,
next: RTENext,
fullRenderOptions: RenderOptions
) => {
return (
<p key={node.uid} className={styles.p}>
{next(node.children, embeds, fullRenderOptions)}
</p>
)
},
}