diff --git a/src/elements/common/button/rvt-button.styles.ts b/src/elements/common/button/rvt-button.styles.ts
index 22a80c1b..f0bec80b 100644
--- a/src/elements/common/button/rvt-button.styles.ts
+++ b/src/elements/common/button/rvt-button.styles.ts
@@ -1,18 +1,16 @@
import { createTV } from 'tailwind-variants';
const tv = createTV({
- twMerge: false
+ // twMerge: false
});
export const button = tv({
base: [
'inline-flex',
- 'gap-2',
'm',
'items-center',
'align-middle',
'will-change-transform',
- 'font-bold',
'min-w-30',
'transition-all',
'duration-100',
@@ -23,12 +21,18 @@ export const button = tv({
variants: {
variant: {
primary: [
- 'relative text-cream-100 fill-cream-100 border-cream-100 border transition-all',
+ 'relative font-bold gap-2 text-cream-100 fill-cream-100 border-cream-100 border transition-all',
"before:content-[''] before:absolute before:inset-0 before:-z-10 before:bg-light-grain before:bg-[size:32px] before:bg-blend-multiply before:transition-all before:opacity-0",
"after:content-[''] after:absolute after:inset-0 after:-z-10 after:bg-dark-grain after:bg-[size:32px] after:transition-all after:opacity-100"
],
- secondary: 'text-white fill-white bg-charcole-900 border-cream-100 border transition-all',
- danger: 'border-red-500 text-red-500 fill-red-500 border transition-all'
+ link: ['text-cream-100 gap-2 font-bold px-0 mx-2'],
+ secondary: [
+ 'text-white gap-2 fill-white bg-charcole-900 border-cream-100 border',
+ 'transition-all text-lg font-bold'
+ ],
+ danger: 'border-red-500 gap-2 font-bold text-red-500 fill-red-500 border transition-all',
+ // very specific types
+ nav: ['text-cream-100 px-3.5 py-1.5 gap-2.5 font-normal font-display']
},
size: {
sm: 'px-2 py-1 text-xs',
@@ -52,6 +56,33 @@ export const button = tv({
'aria-busy:border-neutral-300 aria-busy:hover:bg-transparent aria-busy:translate-y-0 aria-busy:hover:text-white'
]
},
+ {
+ variant: 'link',
+ class: [
+ // hover
+ 'hover:text-white',
+ // disabled
+ 'disabled:text-cream-100/60 disabled:hover:text-cream-100/60',
+ // loading
+ 'aria-busy:text-white'
+ ]
+ },
+ {
+ variant: 'link',
+ size: 'sm',
+ class: ['px-0 mx-2']
+ },
+ {
+ variant: 'nav',
+ size: 'md',
+ class: [
+ 'px-3.5 py-1.5 text-lg',
+ // hover
+ 'hover:text-white hover:bg-white/5',
+ // selected
+ 'aria-current:border-white/10 aria-current:text-white aria-current:bg-white/5'
+ ]
+ },
{
variant: 'danger',
class: [
@@ -87,13 +118,23 @@ export const button = tv({
export const icon = tv({
variants: {
- size: { sm: 'h-2.5 w-2.5', md: 'h-5 w-5"', lg: 'h-6 w-6' },
+ size: { sm: 'h-2.5 w-2.5', md: 'h-5 w-5', lg: 'h-6 w-6' },
variant: {
primary: '',
secondary: '',
- danger: ''
+ link: '',
+ danger: '',
+ // custom variants
+ nav: 'text-cream-100 group-hover:text-white transition-all'
}
- }
+ },
+ compoundVariants: [
+ {
+ variant: 'nav',
+ size: 'md',
+ class: 'h-4 w-4'
+ }
+ ]
});
export type ButtonVariants = (typeof button)['variants'];
diff --git a/src/elements/common/button/rvt-button.ts b/src/elements/common/button/rvt-button.ts
index 00279487..b38f29e7 100644
--- a/src/elements/common/button/rvt-button.ts
+++ b/src/elements/common/button/rvt-button.ts
@@ -49,19 +49,12 @@ export default class RvtButton extends LitElement {
${when(
this.loading,
() => html`