fix: primary button dark appearance

This commit is contained in:
Shibo Lyu 2024-09-03 22:28:56 +08:00
parent 431f14b35d
commit 50b39cfd08

View file

@ -19,9 +19,14 @@
this={href ? 'a' : 'button'} this={href ? 'a' : 'button'}
{href} {href}
class={tw( class={tw(
'inline-flex cursor-default items-center justify-center rounded-md px-2 py-1 text-sf-secondary shadow-sm ring-1 ring-ss-secondary transition-shadow duration-200 hover:ring-ss-primary active:shadow-inner', 'inline-flex cursor-default items-center justify-center rounded-md px-2 py-1 text-sf-secondary shadow-sm ring-1 ring-ss-secondary',
variant === 'primary' && 'transition-shadow duration-200 hover:ring-ss-primary active:shadow-inner',
'relative text-slate-50 ring-0 duration-200 before:absolute before:-inset-px before:rounded-[7px] before:bg-gradient-to-b before:from-accent-400 before:from-40% before:to-accent-500 before:ring-1 before:ring-inset before:ring-black/10 before:transition-shadow active:before:shadow-inner', variant === 'primary' && [
'relative text-slate-50 ring-0 duration-200',
'before:absolute before:-inset-px before:rounded-[7px]',
'before:bg-gradient-to-b before:from-accent-400 before:from-40% before:to-accent-500 before:ring-1 before:ring-inset before:ring-black/10',
'before:transition-shadow active:before:shadow-inner dark:before:from-accent-500 dark:before:to-accent-600'
],
className className
)} )}
{...$$restProps} {...$$restProps}