返回 presentation-ai
table-static.tsx
1 import { cn } from "@/lib/utils";
2 import { SlateElement, type SlateElementProps } from "platejs/static";
3
4 export default function TableElementStatic(props: SlateElementProps) {
5 return (
6 <SlateElement {...props}>
7 <div
8 className={cn("overflow-x-auto")}
9 style={{ borderColor: "hsl(var(--border))" }}
10 >
11 <div
12 className={cn(
13 "min-w-[600px] rounded-lg border bg-card p-2 shadow-2xs",
14 )}
15 style={{
16 backgroundColor: "var(--presentation-background)",
17 color: "var(--presentation-text)",
18 borderColor: "hsl(var(--border))",
19 }}
20 >
21 <div className={cn("grid auto-rows-auto gap-2")}>
22 {props.children}
23 </div>
24 </div>
25 </div>
26 </SlateElement>
27 );
28 }
29
30
31
31 lines Plain Text