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.

fixed tag badge css

Steven Teya54521a7d61e
diff --git a/components/app/links/link-card.tsx b/components/app/links/link-card.tsx
index 48fea11ea4..c01c39fd0a 100644
--- a/components/app/links/link-card.tsx
+++ b/components/app/links/link-card.tsx
@@ -246,7 +246,7 @@ export default function LinkCard({ props }: { props: LinkProps }) {
}}
className="transition-all duration-75 hover:scale-105 active:scale-100"
>
- <TagBadge {...tag} withIcon hideTextOnMobile />
+ <TagBadge {...tag} withIcon />
</button>
)}
</div>
diff --git a/components/app/links/tag-badge.tsx b/components/app/links/tag-badge.tsx
index 509f4a1c19..84e2bdfc97 100644
--- a/components/app/links/tag-badge.tsx
+++ b/components/app/links/tag-badge.tsx
@@ -6,19 +6,17 @@ export default function TagBadge({
name,
color,
withIcon,
- hideTextOnMobile,
}: {
name: string;
color: TagColorProps;
withIcon?: boolean;
- hideTextOnMobile?: boolean;
}) {
return (
<span
className={cn(
"my-auto whitespace-nowrap rounded-md px-2 py-0.5 text-sm",
- withIcon && "flex items-center space-x-1.5",
- hideTextOnMobile && "rounded-full p-1.5",
+ withIcon &&
+ "flex items-center space-x-1.5 rounded-full p-1.5 sm:rounded-md sm:px-2 sm:py-0.5",
color === "red" && "bg-red-100 text-red-600",
color === "yellow" && "bg-yellow-100 text-yellow-600",
color === "green" && "bg-green-100 text-green-600",
@@ -28,7 +26,7 @@ export default function TagBadge({
)}
>
{withIcon && <Tag className="h-3 w-3" />}
- <p {...(hideTextOnMobile && { className: "hidden sm:inline-block" })}>
+ <p {...(withIcon && { className: "hidden sm:inline-block" })}>
{truncate(name || "", 15)}
</p>
</span>