fix(web): show unlinked icon when viewport aspect ratio is unlocked (#6509)
This commit is contained in:
1 parent
1b16ed663f
commit
2fab18e289
1 file changed
+6
-2
@@ -7,7 +7,7 @@ import {
|
||||
type PreviewViewportSetting,
|
||||
} from "@t3tools/contracts";
|
||||
import { PREVIEW_VIEWPORT_PRESETS, resolvePreviewViewport } from "@t3tools/shared/previewViewport";
|
||||
import { Link2, X } from "lucide-react";
|
||||
import { Link2, Unlink2, X } from "lucide-react";
|
||||
import { useState } from "react";
|
||||
|
||||
import { Button } from "~/components/ui/button";
|
||||
@@ -310,7 +310,11 @@ export function BrowserDeviceToolbar({
|
||||
onPointerDown={(event) => event.preventDefault()}
|
||||
onClick={toggleAspectRatio}
|
||||
>
|
||||
<Link2 className={cn(aspectRatio !== null && "text-foreground")} />
|
||||
{aspectRatio === null ? (
|
||||
<Unlink2 className={cn(aspectRatio !== null && "text-foreground")} />
|
||||
) : (
|
||||
<Link2 className={cn(aspectRatio !== null && "text-foreground")} />
|
||||
)}
|
||||
</Button>
|
||||
<Button
|
||||
variant="ghost"
|
||||
|
||||
Reference in new issue
Block a user