Skip to content

Commit e46508d

Browse files
authored
fix: adjust width & padding of segment context handles (#776)
to fix out of bounds handles on small size
1 parent 8ec8629 commit e46508d

File tree

1 file changed

+4
-2
lines changed
  • apps/desktop/src/routes/editor/Timeline

1 file changed

+4
-2
lines changed

apps/desktop/src/routes/editor/Timeline/Track.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,13 @@ export function SegmentRoot(
8888
}
8989

9090
export function SegmentContent(props: ComponentProps<"div">) {
91+
const ctx = useSegmentContext();
9192
return (
9293
<div
9394
{...props}
9495
class={cx(
95-
"relative w-full h-full flex flex-row items-center px-[0.5rem] py-[0.25rem]",
96+
"relative w-full h-full flex flex-row items-center py-[0.25rem]",
97+
ctx.width() < 100 ? "px-0" : "px-[0.5rem]",
9698
props.class
9799
)}
98100
/>
@@ -109,7 +111,7 @@ export function SegmentHandle(
109111
<div
110112
{...props}
111113
class={cx(
112-
"w-3 cursor-col-resize shrink-0 transition-opacity h-full flex flex-row items-center",
114+
"w-3 cursor-col-resize transition-opacity h-full flex flex-row items-center",
113115
props.position === "start"
114116
? "left-0 justify-end"
115117
: "right-0 justify-start",

0 commit comments

Comments
 (0)