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