Skip to content

Commit a1db779

Browse files
Fix label cutoff: add bottom padding, skip last row, position below
Co-authored-by: Aiden Bai <aidenybai@users.noreply.github.com>
1 parent 5d90a36 commit a1db779

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

packages/website/components/mobile-demo-animation.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,7 @@ export const MobileDemoAnimation = (): ReactElement => {
566566
await simulateClickAndCopy(valuePos);
567567
if (isCancelled) return;
568568

569-
for (let i = 0; i < ACTIVITY_DATA.length; i++) {
569+
for (let i = 0; i < ACTIVITY_DATA.length - 1; i++) {
570570
if (isCancelled) return;
571571
const rowPos = activityRowPositions.current[i];
572572
if (!rowPos) continue;
@@ -579,11 +579,11 @@ export const MobileDemoAnimation = (): ReactElement => {
579579

580580
setSelectionBox(createSelectionBox(rowPos, SELECTION_PADDING_PX));
581581
displaySelectionLabel(
582-
rowPos.x + rowPos.width / 2,
583-
rowPos.y - 6,
582+
rowPos.x + 60,
583+
rowPos.y + rowPos.height + 8,
584584
activity.component,
585585
"div",
586-
true,
586+
false,
587587
);
588588
await wait(300);
589589
if (isCancelled) return;
@@ -675,7 +675,7 @@ export const MobileDemoAnimation = (): ReactElement => {
675675
`}</style>
676676

677677
<div className="overflow-hidden rounded-xl border border-white/10 bg-neutral-900 shadow-lg shadow-black/20">
678-
<div ref={containerRef} className="relative p-4">
678+
<div ref={containerRef} className="relative p-4 pb-14">
679679
<div className="mb-4 flex items-center justify-between">
680680
<div>
681681
<div className="text-[13px] font-semibold text-white">

0 commit comments

Comments
 (0)