返回 presentation-ai
code-node.tsx
根目录 / src / components / plate / ui / code-node.tsx
1 "use client";
2
3 import { PlateLeaf, type PlateLeafProps } from "platejs/react";
4
5 export function CodeLeaf(props: PlateLeafProps) {
6 return (
7 <PlateLeaf
8 {...props}
9 as="code"
10 className="rounded-md bg-muted px-[0.3em] py-[0.2em] font-mono text-sm whitespace-pre-wrap"
11 >
12 {props.children}
13 </PlateLeaf>
14 );
15 }
16
16 lines Plain Text