Skip to content

armgit / ui

Public Imported from GitHub
0
TypeScript

Fix color picker copy icon rendering

Andrew Luo2edde41f7b7f
diff --git a/apps/v4/components/ui/color-picker.tsx b/apps/v4/components/ui/color-picker.tsx
index 62eb50d..81092ac 100644
--- a/apps/v4/components/ui/color-picker.tsx
+++ b/apps/v4/components/ui/color-picker.tsx
@@ -507,14 +507,25 @@ function CopyColorButton({
/>
}
>
- <IconPlaceholder
- lucide={copied ? "Check" : "Copy"}
- tabler={copied ? "IconCheck" : "IconCopy"}
- hugeicons={copied ? "Tick02Icon" : "Copy01Icon"}
- phosphor={copied ? "CheckIcon" : "CopyIcon"}
- remixicon={copied ? "RiCheckLine" : "RiFileCopyLine"}
- className="size-4"
- />
+ {copied ? (
+ <IconPlaceholder
+ lucide="Check"
+ tabler="IconCheck"
+ hugeicons="Tick02Icon"
+ phosphor="CheckIcon"
+ remixicon="RiCheckLine"
+ className="size-4"
+ />
+ ) : (
+ <IconPlaceholder
+ lucide="Copy"
+ tabler="IconCopy"
+ hugeicons="Copy01Icon"
+ phosphor="CopyIcon"
+ remixicon="RiFileCopyLine"
+ className="size-4"
+ />
+ )}
</TooltipTrigger>
<TooltipContent side="top">{copied ? "Copied" : "Copy"}</TooltipContent>
</Tooltip>
diff --git a/apps/v4/registry.json b/apps/v4/registry.json
index b8fd0d2..0ae87d3 100644
--- a/apps/v4/registry.json
+++ b/apps/v4/registry.json
@@ -190,7 +190,7 @@
{
"path": "lib/color-picker-utils.ts",
"type": "registry:lib",
- "target": "@/lib/color-picker-utils.ts"
+ "target": "@lib/color-picker-utils.ts"
}
]
},