SurfSense/surfsense_web/components/ui/code-node.tsx

18 lines
384 B
TypeScript
Raw Normal View History

2026-02-17 12:47:39 +05:30
"use client";
2026-02-17 12:47:39 +05:30
import type { PlateLeafProps } from "platejs/react";
import { PlateLeaf } from "platejs/react";
2026-02-20 22:44:56 -08:00
import * as React from "react";
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>
);
}