2026-02-17 12:47:39 +05:30
|
|
|
"use client";
|
2026-02-16 00:11:34 +05:30
|
|
|
|
2026-02-17 12:47:39 +05:30
|
|
|
import * as React from "react";
|
2026-02-16 00:11:34 +05:30
|
|
|
|
2026-02-17 12:47:39 +05:30
|
|
|
import type { PlateLeafProps } from "platejs/react";
|
2026-02-16 00:11:34 +05:30
|
|
|
|
2026-02-17 12:47:39 +05:30
|
|
|
import { PlateLeaf } from "platejs/react";
|
2026-02-16 00:11:34 +05:30
|
|
|
|
|
|
|
|
export function CodeLeaf(props: PlateLeafProps) {
|
2026-02-17 12:47:39 +05:30
|
|
|
return (
|
|
|
|
|
<PlateLeaf
|
|
|
|
|
{...props}
|
|
|
|
|
as="code"
|
|
|
|
|
className="whitespace-pre-wrap rounded-md bg-muted px-[0.3em] py-[0.2em] font-mono text-sm"
|
|
|
|
|
>
|
|
|
|
|
{props.children}
|
|
|
|
|
</PlateLeaf>
|
|
|
|
|
);
|
2026-02-16 00:11:34 +05:30
|
|
|
}
|