From c5c8bb9d466d879a31d4cfd069371148c7d52e4e Mon Sep 17 00:00:00 2001 From: lynx <141365347+iLynxcat@users.noreply.github.com> Date: Sun, 1 Sep 2024 04:21:27 -0500 Subject: [PATCH] swappable badge icon --- apps/landing/src/components/golden-badge.tsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/apps/landing/src/components/golden-badge.tsx b/apps/landing/src/components/golden-badge.tsx index b67160959..5bd5b7432 100644 --- a/apps/landing/src/components/golden-badge.tsx +++ b/apps/landing/src/components/golden-badge.tsx @@ -1,3 +1,4 @@ +import { Icon } from '@phosphor-icons/react'; import { Star } from '@phosphor-icons/react/dist/ssr'; import clsx from 'clsx'; import Link from 'next/link'; @@ -8,13 +9,15 @@ export interface GoldenBadgeProps { href?: string; target?: string; className?: string; + iconComponent?: Icon; } export function GoldenBadge({ headline, href = '/', target = href.match(/^(?:https?\:)\/\//)?.length ? '_blank' : undefined, - className + className, + iconComponent: Icon = Star }: GoldenBadgeProps) { const id = useId(); @@ -30,7 +33,7 @@ export function GoldenBadge({ )} > - - + {headline}