Skip to content

Commit 207a588

Browse files
fix(web): show unlinked icon when viewport aspect ratio is unlocked
1 parent 6bc6cb6 commit 207a588

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

‎apps/web/src/browser/BrowserDeviceToolbar.tsx‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
type PreviewViewportSetting,
88
} from "@t3tools/contracts";
99
import { PREVIEW_VIEWPORT_PRESETS, resolvePreviewViewport } from "@t3tools/shared/previewViewport";
10-
import { Link2, X } from "lucide-react";
10+
import { Link2, Unlink2, X } from "lucide-react";
1111
import { useState } from "react";
1212

1313
import { Button } from "~/components/ui/button";
@@ -310,7 +310,11 @@ export function BrowserDeviceToolbar({
310310
onPointerDown={(event) => event.preventDefault()}
311311
onClick={toggleAspectRatio}
312312
>
313-
<Link2 className={cn(aspectRatio !== null && "text-foreground")} />
313+
{aspectRatio === null ? (
314+
<Unlink2 className={cn(aspectRatio !== null && "text-foreground")} />
315+
) : (
316+
<Link2 className={cn(aspectRatio !== null && "text-foreground")} />
317+
)}
314318
</Button>
315319
<Button
316320
variant="ghost"

0 commit comments

Comments
 (0)