Skip to content

Commit e701d39

Browse files
dev: featured cards design update
1 parent 8a84882 commit e701d39

2 files changed

Lines changed: 21 additions & 17 deletions

File tree

packages/app/src/components/earn/BestOpportunityCard.tsx

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -27,49 +27,49 @@ export function BestOpportunityCard({
2727
<Link
2828
href={`/earn/opportunity/${opportunity.category}/${opportunity.id}`}
2929
onClick={() => onOpportunitySelect?.(opportunity, 'featured-card')}
30-
className="group bg-neutral-100 rounded p-4 flex flex-col gap-4 hover:bg-default-black-hover transition-colors relative justify-between no-underline"
30+
className="group flex flex-col justify-between gap-4 rounded-[15px] border-[0.5px] border-bright-blue bg-earn-featured-card p-4 no-underline transition-colors"
3131
>
3232
<div className="flex items-start justify-between gap-3">
33-
<div className="flex items-start gap-3 flex-1 min-w-0">
34-
<div className="shrink-0 w-10 h-10">
33+
<div className="flex min-w-0 flex-1 items-center gap-2">
34+
<div className="flex h-[46px] w-[46px] shrink-0 items-center justify-center rounded-xl border border-white/5 bg-white/5">
3535
<SafeImage
3636
src={opportunity.tokenIcon}
3737
alt={opportunity.token}
38-
width={40}
39-
height={40}
40-
className="shrink-0 object-contain rounded w-10 h-10"
38+
width={34}
39+
height={34}
40+
className="shrink-0 rounded object-contain"
4141
/>
4242
</div>
43-
<div className="flex-1 min-w-0">
44-
<p className="text-base font-semibold text-white leading-tight truncate">
43+
<div className="min-w-0 flex-1">
44+
<p className="truncate text-lg font-bold leading-tight text-white">
4545
{opportunity.name}
4646
</p>
47-
<p className="text-xs text-white/50 leading-tight truncate mt-0.5">
47+
<p className="mt-1 truncate text-xs leading-tight text-white/50">
4848
{categoryDisplayName}
4949
</p>
5050
</div>
5151
</div>
5252
<Tooltip
5353
content={
54-
<p className="text-xs text-white leading-relaxed">
54+
<p className="text-xs leading-relaxed text-white">
5555
This opportunity has the highest total value locked (TVL) in its category, making it
5656
one of the most popular choices.
5757
</p>
5858
}
5959
>
60-
<div className="shrink-0 flex items-center gap-1 bg-primary-cta rounded px-2 py-1 cursor-help">
60+
<div className="flex shrink-0 cursor-help items-center gap-1 rounded-md bg-earn-featured-badge px-2 py-1">
6161
<SparklesIconSolid className="h-3 w-3 text-white" />
62-
<span className="text-xs font-medium text-white">Featured</span>
62+
<span className="text-xs text-white">Featured</span>
6363
</div>
6464
</Tooltip>
6565
</div>
6666

6767
<div className="flex items-end justify-between gap-3">
68-
<div className="flex flex-col gap-1">
69-
<p className="text-xs text-white/50 leading-none">APY</p>
70-
<p className="text-2xl font-semibold text-white leading-tight">{opportunity.apy}</p>
68+
<div className="flex flex-col">
69+
<p className="text-sm leading-none text-white/50">APY</p>
70+
<p className="text-xl font-medium leading-tight text-white">{opportunity.apy}</p>
7171
</div>
72-
<div className="shrink-0 bg-white/10 rounded p-2 flex items-center justify-center group-hover:bg-white/20">
72+
<div className="bg-white/10 rounded p-2 flex items-center justify-center group-hover:bg-white/20 shrink-0">
7373
<ChevronRightIcon className="h-4 w-4 text-white" />
7474
</div>
7575
</div>

packages/app/tailwind.config.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@ module.exports = {
6262
'banner-gradient':
6363
'linear-gradient(90deg, rgba(40, 160, 240, 0.5) 1.46%, rgba(239, 130, 32, 0.5) 98.51%)',
6464
'celebration-gradient': 'linear-gradient(to right, #1B4ADD6F, #E573106F)',
65+
'earn-featured-card':
66+
'linear-gradient(rgba(18, 170, 255, 0.05), rgba(27, 74, 221, 0.05)), linear-gradient(90deg, rgba(33, 33, 33, 0.8), rgba(33, 33, 33, 0.8)), linear-gradient(90deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.1))',
67+
'earn-featured-badge':
68+
'linear-gradient(170.5deg, rgb(24, 192, 218) 16.333%, rgb(12, 74, 237) 95.811%)',
6569
},
6670
backgroundSize: {
6771
'1/2': '50%',
@@ -78,7 +82,7 @@ module.exports = {
7882
'orange': '#FFEED3',
7983
'lime': '#E8FFE4',
8084
'lavender': '#7693EB',
81-
'bright-blue': '#00FBFF',
85+
'bright-blue': '#18c0da',
8286
'blue': '#12aaff',
8387

8488
// SECONDARY

0 commit comments

Comments
 (0)