Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

fix icons

Kiran K6e03f97f8163
diff --git a/apps/web/ui/folders/folder-access-icon.tsx b/apps/web/ui/folders/folder-access-icon.tsx
index 7660dbd35d..cb685a6bda 100644
--- a/apps/web/ui/folders/folder-access-icon.tsx
+++ b/apps/web/ui/folders/folder-access-icon.tsx
@@ -32,24 +32,50 @@ const iconMap = {
export const FolderAccessIcon = ({
folder,
circlePadding = "p-2.5",
+ withBorder = true,
}: {
folder: Pick<FolderProps, "accessLevel" | "id">;
circlePadding?: string;
+ withBorder?: boolean;
}) => {
if (folder.id === "all-links") {
- return <FolderIcon type="all-links" circlePadding={circlePadding} />;
+ return (
+ <FolderIcon
+ type="all-links"
+ circlePadding={circlePadding}
+ withBorder={withBorder}
+ />
+ );
}
if (folder.accessLevel === null) {
- return <FolderIcon type="private" circlePadding={circlePadding} />;
+ return (
+ <FolderIcon
+ type="private"
+ circlePadding={circlePadding}
+ withBorder={withBorder}
+ />
+ );
}
if (folder.accessLevel === "view") {
- return <FolderIcon type="restricted" circlePadding={circlePadding} />;
+ return (
+ <FolderIcon
+ type="restricted"
+ circlePadding={circlePadding}
+ withBorder={withBorder}
+ />
+ );
}
if (folder.accessLevel === "edit") {
- return <FolderIcon type="open" circlePadding={circlePadding} />;
+ return (
+ <FolderIcon
+ type="open"
+ circlePadding={circlePadding}
+ withBorder={withBorder}
+ />
+ );
}
return null;
@@ -58,12 +84,22 @@ export const FolderAccessIcon = ({
const FolderIcon = ({
type = "open",
circlePadding = "p-2.5",
+ withBorder = true,
}: {
type: "all-links" | "private" | "restricted" | "open";
circlePadding?: string;
+ withBorder?: boolean;
}) => {
const { borderColor, bgColor, IconComponent } = iconMap[type];
+ if (!withBorder) {
+ return (
+ <div className={`rounded-full p-1.5 ${bgColor}`}>
+ <IconComponent className="size-4" />
+ </div>
+ );
+ }
+
return (
<div className={`rounded-full border-2 ${borderColor} ${bgColor}`}>
<div className={`rounded-full border-2 border-white ${circlePadding}`}>
diff --git a/apps/web/ui/folders/folder-switcher.tsx b/apps/web/ui/folders/folder-switcher.tsx
index 62d7bd90c2..c9b2593d56 100644
--- a/apps/web/ui/folders/folder-switcher.tsx
+++ b/apps/web/ui/folders/folder-switcher.tsx
@@ -167,7 +167,7 @@ const FolderList = ({
onFolderSelect(folder);
}}
>
- <FolderAccessIcon folder={folder} circlePadding="p-1" />
+ <FolderAccessIcon folder={folder} withBorder={false} />
<span
className={`block truncate text-sm sm:max-w-[140px] ${
selectedFolder?.id === folder.id ? "font-medium" : "font-normal"