Skip to content

Commit 3296517

Browse files
style(donation): enhance donation item card visuals
Add gradient background, hover lift and shadow transitions, primary-colored heading, and interactive close/purchase button styling on the store donation item card. Co-Authored-By: Hagicode <noreply@hagicode.com> Signed-off-by: newbe36524 <newbe36524@qq.com>
1 parent 75847b8 commit 3296517

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

src/renderer/components/HomeStoreDonationItem.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -183,11 +183,11 @@ export default function HomeStoreDonationItem({ isWindowsStoreRuntime }: HomeSto
183183
};
184184

185185
return (
186-
<section className="rounded-3xl border border-border/80 bg-card p-6 shadow-sm">
186+
<section className="rounded-3xl border border-primary/30 bg-gradient-to-br from-primary/10 via-card to-orange-500/10 p-6 shadow-sm transition-all duration-300 hover:-translate-y-0.5 hover:shadow-md">
187187
<div className="flex items-start justify-between gap-4">
188188
<div>
189-
<h2 className="text-xl font-semibold">作者快穷死了,救救作者</h2>
190-
<p className="mt-2 text-sm text-muted-foreground">作者的 token 要耗尽了,快为作者续命</p>
189+
<h2 className="text-xl font-semibold text-primary">作者快穷死了,救救作者</h2>
190+
<p className="mt-2 text-sm text-foreground/80">作者的 token 要耗尽了,快为作者续命</p>
191191
<p className="mt-3 text-sm text-muted-foreground">
192192
{t('donationItem.purchaseCount', { ns: 'pages', count: state.purchaseCount })}
193193
</p>
@@ -200,6 +200,7 @@ export default function HomeStoreDonationItem({ isWindowsStoreRuntime }: HomeSto
200200
aria-label={t('donationItem.actions.close', { ns: 'pages' })}
201201
onClick={() => void handleDismiss()}
202202
disabled={isDismissing}
203+
className="text-muted-foreground transition-colors hover:bg-background/80 hover:text-foreground"
203204
>
204205
<X className="h-4 w-4" />
205206
</Button>
@@ -211,10 +212,10 @@ export default function HomeStoreDonationItem({ isWindowsStoreRuntime }: HomeSto
211212
type="button"
212213
onClick={() => void handlePurchase()}
213214
disabled={isPurchasing}
214-
className="gap-2"
215+
className="group gap-2 shadow-sm transition-all duration-300 hover:-translate-y-0.5 hover:shadow-lg hover:shadow-primary/30"
215216
>
216217
{isPurchasing ? t('donationItem.actions.purchasing', { ns: 'pages' }) : t('donationItem.actions.purchase', { ns: 'pages' })}
217-
<ArrowRight className="h-4 w-4" />
218+
<ArrowRight className="h-4 w-4 transition-transform duration-300 group-hover:translate-x-0.5" />
218219
</Button>
219220
</div>
220221
</section>

0 commit comments

Comments
 (0)