frameless button, link: add inverted colour state
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
icon?: IconDef;
|
||||
iconPosition?: 'left' | 'right';
|
||||
disabled?: boolean;
|
||||
inverted?: boolean;
|
||||
class?: ClassValue | null | undefined;
|
||||
children: Snippet;
|
||||
onclick?: MouseEventHandler<HTMLButtonElement>;
|
||||
@@ -16,6 +17,7 @@
|
||||
icon,
|
||||
iconPosition = 'right',
|
||||
disabled = false,
|
||||
inverted = false,
|
||||
class: classValue,
|
||||
children,
|
||||
onclick
|
||||
@@ -31,8 +33,11 @@
|
||||
<button
|
||||
type="button"
|
||||
class={[
|
||||
'text-sui-accent hover:text-sui-primary inline-flex cursor-pointer items-center gap-1.5 transition-colors',
|
||||
'inline-flex cursor-pointer items-center gap-1.5 transition-colors',
|
||||
disabled && 'pointer-events-none cursor-not-allowed opacity-50',
|
||||
inverted
|
||||
? 'text-sui-background hover:text-sui-background/80 font-medium'
|
||||
: 'text-sui-accent hover:text-sui-primary',
|
||||
classValue
|
||||
]}
|
||||
{onclick}
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
basepath?: string | null;
|
||||
disabled?: boolean;
|
||||
tab?: 'current' | 'new';
|
||||
inverted?: boolean;
|
||||
class?: ClassValue | null | undefined;
|
||||
children: Snippet;
|
||||
onclick?: MouseEventHandler<HTMLAnchorElement>;
|
||||
@@ -50,6 +51,7 @@
|
||||
basepath,
|
||||
disabled = false,
|
||||
tab = 'current',
|
||||
inverted = false,
|
||||
class: classValue,
|
||||
children,
|
||||
onclick
|
||||
@@ -60,8 +62,11 @@
|
||||
|
||||
<a
|
||||
class={[
|
||||
'text-sui-accent hover:text-sui-primary inline-flex items-center gap-1.5 transition-colors',
|
||||
'inline-flex items-center gap-1.5 transition-colors',
|
||||
disabled && 'pointer-events-none cursor-not-allowed opacity-50',
|
||||
inverted
|
||||
? 'text-sui-background hover:text-sui-background/80 font-medium'
|
||||
: 'text-sui-accent hover:text-sui-primary',
|
||||
classValue
|
||||
]}
|
||||
href={computedHref}
|
||||
|
||||
Reference in New Issue
Block a user