1
1
// types
2
2
import { ButtonStateType , ButtonStylesType } from '@/components/button/types' ;
3
+ import { DeviceBreakpointsType } from '@/types' ;
3
4
4
5
// constants
5
6
import {
6
7
BORDERS ,
7
8
COLORS ,
8
9
FONT_FAMILY ,
9
10
FONT_WEIGHT ,
11
+ PARAGRAPH ,
10
12
SIZES ,
11
13
SPACINGS ,
12
14
TEXT_ALIGN ,
@@ -29,7 +31,6 @@ const commonPropsDefault = {
29
31
border_radius : BORDERS . border_00 ,
30
32
text_align : TEXT_ALIGN . center ,
31
33
font_family : FONT_FAMILY . font_family_nunito_sans ,
32
- font_size : '1rem' ,
33
34
} ;
34
35
35
36
export const BUTTON_STYLES : ButtonStylesType < ButtonVariantType , ButtonSizeType > = {
@@ -40,9 +41,12 @@ export const BUTTON_STYLES: ButtonStylesType<ButtonVariantType, ButtonSizeType>
40
41
padding_bottom : SPACINGS . spacing_150 ,
41
42
gap : SPACINGS . spacing_100 ,
42
43
44
+ font_size : PARAGRAPH . SMALL [ DeviceBreakpointsType . DESKTOP ] . font_size ,
45
+ line_height : PARAGRAPH . SMALL [ DeviceBreakpointsType . DESKTOP ] . line_height ,
46
+
43
47
icon : {
44
- width : SIZES . size_250 ,
45
- height : SIZES . size_250 ,
48
+ width : SIZES . size_200 ,
49
+ height : SIZES . size_200 ,
46
50
} ,
47
51
} ,
48
52
[ ButtonSizeType . MEDIUM ] : {
@@ -52,21 +56,27 @@ export const BUTTON_STYLES: ButtonStylesType<ButtonVariantType, ButtonSizeType>
52
56
padding_bottom : SPACINGS . spacing_250 ,
53
57
gap : SPACINGS . spacing_150 ,
54
58
59
+ font_size : PARAGRAPH . MEDIUM [ DeviceBreakpointsType . DESKTOP ] . font_size ,
60
+ line_height : PARAGRAPH . MEDIUM [ DeviceBreakpointsType . DESKTOP ] . line_height ,
61
+
55
62
icon : {
56
63
width : SIZES . size_250 ,
57
64
height : SIZES . size_250 ,
58
65
} ,
59
66
} ,
60
67
[ ButtonSizeType . LARGE ] : {
61
- padding_right : SPACINGS . spacing_400 ,
62
- padding_left : SPACINGS . spacing_400 ,
63
- padding_top : SPACINGS . spacing_300 ,
64
- padding_bottom : SPACINGS . spacing_300 ,
68
+ padding_right : SPACINGS . spacing_300 ,
69
+ padding_left : SPACINGS . spacing_300 ,
70
+ padding_top : SPACINGS . spacing_250 ,
71
+ padding_bottom : SPACINGS . spacing_250 ,
65
72
gap : SPACINGS . spacing_150 ,
66
73
74
+ font_size : PARAGRAPH . MEDIUM [ DeviceBreakpointsType . DESKTOP ] . font_size ,
75
+ line_height : PARAGRAPH . MEDIUM [ DeviceBreakpointsType . DESKTOP ] . line_height ,
76
+
67
77
icon : {
68
- width : SIZES . size_300 ,
69
- height : SIZES . size_300 ,
78
+ width : SIZES . size_250 ,
79
+ height : SIZES . size_250 ,
70
80
} ,
71
81
} ,
72
82
[ ButtonVariantType . PRIMARY ] : {
@@ -125,19 +135,19 @@ export const BUTTON_STYLES: ButtonStylesType<ButtonVariantType, ButtonSizeType>
125
135
[ ButtonStateType . PRESSED ] : {
126
136
...actionCommonProps ,
127
137
altVariant : true ,
128
- color : COLORS . PRESSED . color_accent_pressed_font_50 ,
129
- background_color : COLORS . PRESSED . color_accent_pressed_bg_100 ,
138
+ color : COLORS . ACCENT . color_accent_default_font_100 ,
139
+ text_decoration : 'none' ,
130
140
icon : {
131
- color : COLORS . PRESSED . color_accent_pressed_icon_50 ,
141
+ color : COLORS . ACCENT . color_accent_default_icon_100 ,
132
142
} ,
133
143
} ,
134
144
[ ButtonStateType . HOVER ] : {
135
145
...actionCommonProps ,
136
146
altVariant : true ,
137
- color : COLORS . ACCENT . color_accent_default_font_100 ,
138
- text_decoration : 'none' ,
147
+ color : COLORS . PRESSED . color_accent_pressed_font_50 ,
148
+ background_color : COLORS . PRESSED . color_accent_pressed_bg_100 ,
139
149
icon : {
140
- color : COLORS . ACCENT . color_accent_default_icon_100 ,
150
+ color : COLORS . PRESSED . color_accent_pressed_icon_50 ,
141
151
} ,
142
152
} ,
143
153
[ ButtonStateType . DISABLED ] : {
@@ -161,19 +171,19 @@ export const BUTTON_STYLES: ButtonStylesType<ButtonVariantType, ButtonSizeType>
161
171
[ ButtonStateType . PRESSED ] : {
162
172
...actionCommonProps ,
163
173
altVariant : true ,
164
- color : COLORS . PRESSED . color_accent_pressed_font_150 ,
165
- background_color : COLORS . PRESSED . color_accent_pressed_bg_100 ,
174
+ color : COLORS . ACCENT . color_accent_default_font_50 ,
175
+ text_decoration : 'none' ,
166
176
icon : {
167
- color : COLORS . PRESSED . color_accent_pressed_icon_150 ,
177
+ color : COLORS . ACCENT . color_accent_default_icon_50 ,
168
178
} ,
169
179
} ,
170
180
[ ButtonStateType . HOVER ] : {
171
181
...actionCommonProps ,
172
182
altVariant : true ,
173
- color : COLORS . ACCENT . color_accent_default_font_50 ,
174
- text_decoration : 'none' ,
183
+ color : COLORS . PRESSED . color_accent_pressed_font_150 ,
184
+ background_color : COLORS . PRESSED . color_accent_pressed_bg_100 ,
175
185
icon : {
176
- color : COLORS . ACCENT . color_accent_default_icon_50 ,
186
+ color : COLORS . PRESSED . color_accent_pressed_icon_150 ,
177
187
} ,
178
188
} ,
179
189
[ ButtonStateType . DISABLED ] : {
@@ -189,34 +199,32 @@ export const BUTTON_STYLES: ButtonStylesType<ButtonVariantType, ButtonSizeType>
189
199
[ ButtonStateType . DEFAULT ] : {
190
200
...actionCommonProps ,
191
201
altVariant : true ,
192
- // text_decoration: 'none',
193
202
color : COLORS . ACCENT . color_accent_default_font_150 ,
194
203
icon : {
195
- color : COLORS . ACCENT . color_accent_default_font_150 ,
204
+ color : COLORS . ACCENT . color_accent_default_icon_150 ,
196
205
} ,
197
206
} ,
198
207
[ ButtonStateType . PRESSED ] : {
199
208
...actionCommonProps ,
200
209
altVariant : true ,
201
- // text_decoration: 'none',
202
- color : COLORS . ACCENT . color_accent_default_font_100 ,
210
+ text_decoration : 'none' ,
211
+ color : COLORS . ACCENT . color_accent_default_font_150 ,
203
212
icon : {
204
- color : COLORS . ACCENT . color_accent_default_font_100 ,
213
+ color : COLORS . ACCENT . color_accent_default_icon_150 ,
205
214
} ,
206
215
} ,
207
216
[ ButtonStateType . HOVER ] : {
208
217
...actionCommonProps ,
209
218
altVariant : true ,
210
- text_decoration : 'none' ,
211
- color : COLORS . NEUTRAL . color_neutral_font_150 ,
219
+ color : COLORS . PRESSED . color_accent_pressed_font_100 ,
220
+ background_color : COLORS . PRESSED . color_accent_pressed_bg_200 ,
212
221
icon : {
213
- color : COLORS . NEUTRAL . color_neutral_font_150 ,
222
+ color : COLORS . PRESSED . color_accent_pressed_icon_100 ,
214
223
} ,
215
224
} ,
216
225
[ ButtonStateType . DISABLED ] : {
217
226
...actionCommonProps ,
218
227
altVariant : true ,
219
- // text_decoration: 'none',
220
228
color : COLORS . DISABLED . color_accentDisabled_font_100 ,
221
229
icon : {
222
230
color : COLORS . DISABLED . color_accentDisabled_icon_100 ,
0 commit comments