Skip to content

Commit 07c2289

Browse files
committed
feat: add properties for video/image/sticker elements
1 parent 9871532 commit 07c2289

2 files changed

Lines changed: 19 additions & 7 deletions

File tree

apps/web/src/components/editor/panels/properties/index.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export function PropertiesPanel() {
1717
});
1818

1919
return (
20-
<div className="panel bg-background h-full rounded-sm border overflow-hidden">
20+
<div className="panel bg-background h-full rounded-sm border border-t-0 overflow-hidden">
2121
{selectedElements.length > 0 ? (
2222
<ScrollArea className="h-full scrollbar-hidden">
2323
{elementsWithTracks.map(({ track, element }) => {
@@ -31,10 +31,14 @@ export function PropertiesPanel() {
3131
if (element.type === "audio") {
3232
return <AudioProperties key={element.id} _element={element} />;
3333
}
34-
if (element.type === "video" || element.type === "image") {
34+
if (
35+
element.type === "video" ||
36+
element.type === "image" ||
37+
element.type === "sticker"
38+
) {
3539
return (
3640
<div key={element.id}>
37-
<VideoProperties _element={element} />
41+
<VideoProperties element={element} trackId={track.id} />
3842
</div>
3943
);
4044
}
Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
1-
import type { ImageElement, VideoElement } from "@/types/timeline";
1+
import type { ImageElement, StickerElement, VideoElement } from "@/types/timeline";
2+
import { BlendingSection, TransformSection } from "./sections";
23

34
export function VideoProperties({
4-
_element,
5+
element,
6+
trackId,
57
}: {
6-
_element: VideoElement | ImageElement;
8+
element: VideoElement | ImageElement | StickerElement;
9+
trackId: string;
710
}) {
8-
return <div className="space-y-4 p-5">Video properties</div>;
11+
return (
12+
<div className="flex h-full flex-col">
13+
<TransformSection element={element} trackId={trackId} />
14+
<BlendingSection element={element} trackId={trackId} />
15+
</div>
16+
);
917
}

0 commit comments

Comments
 (0)