返回 presentation-ai
kbd-node.tsx
根目录 / src / components / plate / ui / kbd-node.tsx
1 "use client";
2
3 import { PlateLeaf, type PlateLeafProps } from "platejs/react";
4
5 export function KbdLeaf(props: PlateLeafProps) {
6 return (
7 <PlateLeaf
8 {...props}
9 as="kbd"
10 className="rounded border border-border bg-muted px-1.5 py-0.5 font-mono text-sm shadow-[rgba(255,255,255,0.1)_0px_0.5px_0px_0px_inset,rgb(248,249,250)_0px_1px_5px_0px_inset,rgb(193,200,205)_0px_0px_0px_0.5px,rgb(193,200,205)_0px_2px_1px_-1px,rgb(193,200,205)_0px_1px_0px_0px] dark:shadow-[rgba(255,255,255,0.1)_0px_0.5px_0px_0px_inset,rgb(26,29,30)_0px_1px_5px_0px_inset,rgb(76,81,85)_0px_0px_0px_0.5px,rgb(76,81,85)_0px_2px_1px_-1px,rgb(76,81,85)_0px_1px_0px_0px]"
11 >
12 {props.children}
13 </PlateLeaf>
14 );
15 }
16
16 lines Plain Text