File tree Expand file tree Collapse file tree 2 files changed +30
-11
lines changed
apps/website/src/routes/docs/headless/(components)/button
packages/kit-fluffy/src/components/button Expand file tree Collapse file tree 2 files changed +30
-11
lines changed Original file line number Diff line number Diff line change 1
- import { $ , component$ , useStyles$ } from '@builder.io/qwik' ;
1
+ import { component$ , useStyles$ } from '@builder.io/qwik' ;
2
2
import { Button } from '@qwik-ui/primitives' ;
3
3
import styles from './index.css?inline' ;
4
4
5
5
export default component$ ( ( ) => {
6
6
useStyles$ ( styles ) ;
7
7
8
8
return (
9
- < div class = "flex flex-col gap-8 mt-4 " >
9
+ < div class = "mt-4 flex flex-col gap-8" >
10
10
< h2 > This is the documentation for the Button</ h2 >
11
- < div class = "flex flex-col gap-8 mt-4 " >
11
+ < div class = "mt-4 flex flex-col gap-8" >
12
12
< div >
13
13
< h2 > Basic Example</ h2 >
14
14
< Button > SIMPLE BUTTON</ Button >
@@ -29,7 +29,7 @@ export default component$(() => {
29
29
30
30
< div >
31
31
< h2 > Events</ h2 >
32
- < Button onClick$ = { $ ( ( ) => window . alert ( 'hello' ) ) } > SHOW ALERT</ Button >
32
+ < Button onClick$ = { ( ) => window . alert ( 'hello' ) } > SHOW ALERT</ Button >
33
33
</ div >
34
34
</ div >
35
35
</ div >
Original file line number Diff line number Diff line change 21
21
* INTENT
22
22
* Primary
23
23
* Secondary
24
- * Danger / Destructive
24
+ * Accent
25
+ * Danger / Destructive / Error
26
+ * Success
27
+ * Warning
28
+ * Info
29
+
30
+ STATE:
31
+ * Active
32
+ * Disabled
33
+
25
34
* LOOK
26
35
* Outline
27
36
* Ghost
28
37
* Link
29
-
30
- * STATE
31
- * Active
32
- * Disabled
38
+
39
+
33
40
34
41
DOCS EXAMPLES:
35
42
* with Icon
@@ -55,14 +62,25 @@ export const buttonVariants = cva(
55
62
intent : {
56
63
primary : 'bg-primary text-primary-foreground hover:bg-primary/90' ,
57
64
secondary : 'bg-secondary text-secondary-foreground hover:bg-secondary/80' ,
58
- destructive : 'bg-destructive text-destructive-foreground hover:bg-destructive/90' ,
59
- link : 'text-primary underline-offset-4 hover:underline' ,
65
+ danger : 'bg-destructive text-destructive-foreground hover:bg-destructive/90' ,
60
66
} ,
61
67
look : {
68
+ link : 'text-primary underline-offset-4 hover:underline' ,
62
69
ghost : 'hover:bg-accent hover:text-accent-foreground' ,
63
70
outline :
64
71
'border border-input bg-background hover:bg-accent hover:text-accent-foreground' ,
65
72
} ,
73
+ shape : {
74
+ rounded : '' ,
75
+ circular : '' ,
76
+ square : '' ,
77
+ } ,
78
+ state : {
79
+ enabled : '' ,
80
+ active : '' ,
81
+ disabled : '' ,
82
+ } ,
83
+ animation : { } ,
66
84
size : {
67
85
default : 'h-10 px-4 py-2' ,
68
86
sm : 'h-9 rounded-md px-3' ,
@@ -71,6 +89,7 @@ export const buttonVariants = cva(
71
89
} ,
72
90
} ,
73
91
defaultVariants : {
92
+ state : 'enabled' ,
74
93
intent : 'primary' ,
75
94
size : 'default' ,
76
95
} ,
You can’t perform that action at this time.
0 commit comments