File tree Expand file tree Collapse file tree 4 files changed +30
-25
lines changed
kit-fluffy/src/components/button
kit-tailwind/src/components Expand file tree Collapse file tree 4 files changed +30
-25
lines changed Original file line number Diff line number Diff line change @@ -56,25 +56,25 @@ export const buttonVariants = cva(
56
56
primary : 'bg-primary text-primary-foreground hover:bg-primary/90' ,
57
57
secondary : 'bg-secondary text-secondary-foreground hover:bg-secondary/80' ,
58
58
destructive : 'bg-destructive text-destructive-foreground hover:bg-destructive/90' ,
59
- link : 'text-primary underline-offset-4 hover:underline'
59
+ link : 'text-primary underline-offset-4 hover:underline' ,
60
60
} ,
61
61
look : {
62
62
ghost : 'hover:bg-accent hover:text-accent-foreground' ,
63
63
outline :
64
- 'border border-input bg-background hover:bg-accent hover:text-accent-foreground'
64
+ 'border border-input bg-background hover:bg-accent hover:text-accent-foreground' ,
65
65
} ,
66
66
size : {
67
67
default : 'h-10 px-4 py-2' ,
68
68
sm : 'h-9 rounded-md px-3' ,
69
69
lg : 'h-11 rounded-md px-8' ,
70
- icon : 'h-10 w-10'
71
- }
70
+ icon : 'h-10 w-10' ,
71
+ } ,
72
72
} ,
73
73
defaultVariants : {
74
74
intent : 'primary' ,
75
- size : 'default'
76
- }
77
- }
75
+ size : 'default' ,
76
+ } ,
77
+ } ,
78
78
) ;
79
79
80
80
export type ButtonProps = AddVariantPropsTo < 'button' , typeof buttonVariants > ;
Original file line number Diff line number Diff line change 1
- import { component$ , HTMLAttributes , Slot } from '@builder.io/qwik' ;
1
+ import { HTMLAttributes , Slot , component$ } from '@builder.io/qwik' ;
2
2
import { ButtonGroup as HeadlessButtonGroup } from '@qwik-ui/headless' ;
3
+ // eslint-disable-next-line @nx/enforce-module-boundaries
4
+ import type { OmitSignalClass } from '../../../../shared/src/utils' ;
3
5
4
- export type ButtonGroupProps = HTMLAttributes < HTMLElement > ;
6
+ export type ButtonGroupProps = OmitSignalClass < HTMLAttributes < HTMLElement > > ;
5
7
6
8
// TODO: discuss this
7
9
Original file line number Diff line number Diff line change @@ -50,22 +50,22 @@ export const Button = component$((props: ButtonProps) => {
50
50
return (
51
51
< button
52
52
{ ...rest }
53
- // class={[
54
- // 'btn',
55
- // variants[variant],
56
- // sizes[size],
57
- // {
58
- // [options.active]: active,
59
- // [options.outline]: outline,
60
- // [options.disabled]: disabled,
61
- // [options.glass]: glass,
62
- // [options.loading]: loading,
63
- // [options.noAnimation]: noAnimation,
64
- // [options.circle]: circle,
65
- // [options.square]: square,
66
- // },
67
- // classNames,
68
- // ]}
53
+ class = { [
54
+ 'btn' ,
55
+ variants [ variant ] ,
56
+ sizes [ size ] ,
57
+ {
58
+ [ options . active ] : active ,
59
+ [ options . outline ] : outline ,
60
+ [ options . disabled ] : disabled ,
61
+ [ options . glass ] : glass ,
62
+ [ options . loading ] : loading ,
63
+ [ options . noAnimation ] : noAnimation ,
64
+ [ options . circle ] : circle ,
65
+ [ options . square ] : square ,
66
+ } ,
67
+ classNames ,
68
+ ] }
69
69
>
70
70
< Slot />
71
71
</ button >
Original file line number Diff line number Diff line change
1
+ import { ClassList } from '@builder.io/qwik' ;
2
+
3
+ export type OmitSignalClass < T > = Omit < T , 'class' > & { class ?: ClassList } ;
You can’t perform that action at this time.
0 commit comments