forked from DA0-DA0/dao-dao-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbutton.js
139 lines (138 loc) · 3.61 KB
/
button.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
/** @type {import("tailwindcss/plugin").TailwindPluginCreator} */
const plugin = require('tailwindcss/plugin')
module.exports = plugin(function ({ addComponents }) {
addComponents({
'.sm': {
'@apply px-2 py-1 text-xs leading-4 rounded': {},
},
'.md': {
'@apply py-1.5': {},
},
'.lg': {
'@apply py-2.5': {},
},
'.xl': {
'@apply px-6 py-5 text-lg leading-5': {},
},
'.md, .lg': {
fontSize: 13,
'@apply px-4 leading-5 rounded-md': {},
},
'.light': {
'&.primary': {
background: 'rgba(25, 29, 32, 0.95)',
color: 'rgba(255, 255, 255)',
'.btn-icon': {
color: 'rgba(255, 255, 255)',
},
'&:hover': {
background: 'rgba(25, 29, 32)',
},
'&:active': {
background: 'rgba(25, 29, 32, 0.85)',
},
'&:focus': {
outline: '2px solid rgba(25, 29, 32, 0.3)',
},
'&:disabled': {
background: 'rgba(25, 29, 32, 0.3)',
color: 'rgba(243, 246, 248, 0.95)',
},
},
'&.secondary': {
background: 'rgba(25, 29, 32, 0.1)',
color: 'rgba(6, 9, 11)',
'&:hover': {
background: 'rgba(25, 29, 32, 0.15)',
},
'&:active': {
background: 'rgba(25, 29, 32, 0.05)',
},
'&:focus': {
outline: '2px solid rgba(25, 29, 32, 0.3)',
},
'&:disabled': {
background: 'rgba(25, 29, 32, 0.05)',
color: 'rgba(25, 29, 32, 0.3)',
},
},
'&.ghost': {
background: 'rgba(255, 255, 255)',
color: 'rgba(25, 29, 32, 0.75)',
'&:hover': {
background: 'rgba(25, 29, 32, 0.1)',
},
'&:active': {
background: 'rgba(25, 29, 32, 0.05)',
},
'&:focus': {
outline: '2px solid rgba(25, 29, 32, 0.3)',
},
'&:disabled': {
color: 'rgba(25, 29, 32, 0.3)',
},
},
},
'.dark': {
'&.primary': {
background: 'rgba(243, 246, 248, 0.95)',
color: 'rgba(6, 9, 11)',
'.btn-icon': {
color: 'rgba(6, 9, 11)',
},
'&:hover': {
background: 'rgba(255, 255, 255)',
},
'&:active': {
background: 'rgba(243, 246, 248, 0.85)',
},
'&:focus': {
outline: '2px solid rgba(243, 246, 248, 0.3)',
},
'&:disabled': {
background: 'rgba(243, 246, 248, 0.3)',
color: 'rgba(25, 29, 32, 0.95)',
},
},
'&.secondary': {
background: 'rgba(243, 246, 248, 0.1)',
color: 'rgba(255, 255, 255)',
'&:hover': {
background: 'rgba(243, 246, 248, 0.15)',
},
'&:active': {
background: 'rgba(243, 246, 248, 0.05)',
},
'&:focus': {
outline: '2px solid rgba(243, 246, 248, 0.3)',
},
'&:disabled': {
background: 'rgba(243, 246, 248, 0.05)',
color: 'rgba(243, 246, 248, 0.3)',
},
},
'&.ghost': {
background: 'rgba(6, 9, 11)',
color: 'rgba(243, 246, 248, 0.75)',
'&:hover': {
background: 'rgba(243, 246, 248, 0.1)',
},
'&:active': {
background: 'rgba(243, 246, 248, 0.05)',
},
'&:focus': {
outline: '2px solid rgba(243, 246, 248, 0.3)',
},
'&:disabled': {
color: 'rgba(243, 246, 248, 0.3)',
},
},
},
'.light, .dark': {
'&.btn': {
'@apply block h-full min-h-full font-medium normal-case border-none':
{},
},
},
})
})