返回 presentation-ai
InfographicEditorPanel.tsx
根目录 / src / components / presentation / edit-panel / sections / InfographicEditorPanel.tsx
1 "use client";
2
3 import { X } from "lucide-react";
4
5 import { Button } from "@/components/ui/button";
6 import { usePresentationState } from "@/states/presentation-state";
7 import { InfographicEditorControls } from "./InfographicEditorControls";
8
9 export function InfographicEditorPanel() {
10 const closeInfographicEditor = usePresentationState(
11 (s) => s.closeInfographicEditor,
12 );
13 const currentSlideId = usePresentationState((s) => s.currentSlideId);
14
15 if (!currentSlideId) {
16 return null;
17 }
18
19 return (
20 <div className="flex h-full w-full flex-col border-l bg-background">
21 {/* Header */}
22 <div className="flex items-center justify-between border-b px-4 py-2">
23 <h2 className="text-sm font-semibold">Infographic Editor</h2>
24 <Button
25 variant="ghost"
26 size="icon"
27 onClick={closeInfographicEditor}
28 className="size-8 rounded-full p-0"
29 >
30 <X className="size-5" />
31 </Button>
32 </div>
33
34 {/* Main Content */}
35 <div className="min-h-0 flex-1 overflow-hidden">
36 <InfographicEditorControls />
37 </div>
38 </div>
39 );
40 }
41
41 lines Plain Text