summaryrefslogtreecommitdiff
path: root/apps/web/src/components/editor/properties-panel.tsx
blob: a51f6f2ae8d22acd48f9c8dd6e0b9771b38f3751 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
"use client";

import { useProjectStore } from "@/stores/project-store";
import { useAspectRatio } from "@/hooks/use-aspect-ratio";
import { Label } from "../ui/label";
import { ScrollArea } from "../ui/scroll-area";

export function PropertiesPanel() {
  const { activeProject } = useProjectStore();
  const { getDisplayName, canvasSize } = useAspectRatio();

  return (
    <ScrollArea className="h-full">
      <div className="space-y-4 p-5">
        {/* Media Properties */}
        <div className="flex flex-col gap-3">
          <PropertyItem label="Name:" value={activeProject?.name || ""} />
          <PropertyItem label="Aspect ratio:" value={getDisplayName()} />
          <PropertyItem
            label="Resolution:"
            value={`${canvasSize.width} × ${canvasSize.height}`}
          />
          <PropertyItem label="Frame rate:" value="30.00fps" />
        </div>
      </div>
    </ScrollArea>
  );
}

function PropertyItem({ label, value }: { label: string; value: string }) {
  return (
    <div className="flex justify-between">
      <Label className="text-xs text-muted-foreground">{label}</Label>
      <span className="text-xs text-right">{value}</span>
    </div>
  );
}