Skip to content

Commit 05a2ed3

Browse files
author
Hector Arce De Las Heras
committed
New button sizes styles
1 parent c778a17 commit 05a2ed3

File tree

2 files changed

+41
-30
lines changed

2 files changed

+41
-30
lines changed

src/designSystem/kubit/components/button/styles.ts

Lines changed: 38 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
// types
22
import { ButtonStateType, ButtonStylesType } from '@/components/button/types';
3+
import { DeviceBreakpointsType } from '@/types';
34

45
// constants
56
import {
67
BORDERS,
78
COLORS,
89
FONT_FAMILY,
910
FONT_WEIGHT,
11+
PARAGRAPH,
1012
SIZES,
1113
SPACINGS,
1214
TEXT_ALIGN,
@@ -29,7 +31,6 @@ const commonPropsDefault = {
2931
border_radius: BORDERS.border_00,
3032
text_align: TEXT_ALIGN.center,
3133
font_family: FONT_FAMILY.font_family_nunito_sans,
32-
font_size: '1rem',
3334
};
3435

3536
export const BUTTON_STYLES: ButtonStylesType<ButtonVariantType, ButtonSizeType> = {
@@ -40,9 +41,12 @@ export const BUTTON_STYLES: ButtonStylesType<ButtonVariantType, ButtonSizeType>
4041
padding_bottom: SPACINGS.spacing_150,
4142
gap: SPACINGS.spacing_100,
4243

44+
font_size: PARAGRAPH.SMALL[DeviceBreakpointsType.DESKTOP].font_size,
45+
line_height: PARAGRAPH.SMALL[DeviceBreakpointsType.DESKTOP].line_height,
46+
4347
icon: {
44-
width: SIZES.size_250,
45-
height: SIZES.size_250,
48+
width: SIZES.size_200,
49+
height: SIZES.size_200,
4650
},
4751
},
4852
[ButtonSizeType.MEDIUM]: {
@@ -52,21 +56,27 @@ export const BUTTON_STYLES: ButtonStylesType<ButtonVariantType, ButtonSizeType>
5256
padding_bottom: SPACINGS.spacing_250,
5357
gap: SPACINGS.spacing_150,
5458

59+
font_size: PARAGRAPH.MEDIUM[DeviceBreakpointsType.DESKTOP].font_size,
60+
line_height: PARAGRAPH.MEDIUM[DeviceBreakpointsType.DESKTOP].line_height,
61+
5562
icon: {
5663
width: SIZES.size_250,
5764
height: SIZES.size_250,
5865
},
5966
},
6067
[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,
6572
gap: SPACINGS.spacing_150,
6673

74+
font_size: PARAGRAPH.MEDIUM[DeviceBreakpointsType.DESKTOP].font_size,
75+
line_height: PARAGRAPH.MEDIUM[DeviceBreakpointsType.DESKTOP].line_height,
76+
6777
icon: {
68-
width: SIZES.size_300,
69-
height: SIZES.size_300,
78+
width: SIZES.size_250,
79+
height: SIZES.size_250,
7080
},
7181
},
7282
[ButtonVariantType.PRIMARY]: {
@@ -125,19 +135,19 @@ export const BUTTON_STYLES: ButtonStylesType<ButtonVariantType, ButtonSizeType>
125135
[ButtonStateType.PRESSED]: {
126136
...actionCommonProps,
127137
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',
130140
icon: {
131-
color: COLORS.PRESSED.color_accent_pressed_icon_50,
141+
color: COLORS.ACCENT.color_accent_default_icon_100,
132142
},
133143
},
134144
[ButtonStateType.HOVER]: {
135145
...actionCommonProps,
136146
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,
139149
icon: {
140-
color: COLORS.ACCENT.color_accent_default_icon_100,
150+
color: COLORS.PRESSED.color_accent_pressed_icon_50,
141151
},
142152
},
143153
[ButtonStateType.DISABLED]: {
@@ -161,19 +171,19 @@ export const BUTTON_STYLES: ButtonStylesType<ButtonVariantType, ButtonSizeType>
161171
[ButtonStateType.PRESSED]: {
162172
...actionCommonProps,
163173
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',
166176
icon: {
167-
color: COLORS.PRESSED.color_accent_pressed_icon_150,
177+
color: COLORS.ACCENT.color_accent_default_icon_50,
168178
},
169179
},
170180
[ButtonStateType.HOVER]: {
171181
...actionCommonProps,
172182
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,
175185
icon: {
176-
color: COLORS.ACCENT.color_accent_default_icon_50,
186+
color: COLORS.PRESSED.color_accent_pressed_icon_150,
177187
},
178188
},
179189
[ButtonStateType.DISABLED]: {
@@ -189,34 +199,32 @@ export const BUTTON_STYLES: ButtonStylesType<ButtonVariantType, ButtonSizeType>
189199
[ButtonStateType.DEFAULT]: {
190200
...actionCommonProps,
191201
altVariant: true,
192-
// text_decoration: 'none',
193202
color: COLORS.ACCENT.color_accent_default_font_150,
194203
icon: {
195-
color: COLORS.ACCENT.color_accent_default_font_150,
204+
color: COLORS.ACCENT.color_accent_default_icon_150,
196205
},
197206
},
198207
[ButtonStateType.PRESSED]: {
199208
...actionCommonProps,
200209
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,
203212
icon: {
204-
color: COLORS.ACCENT.color_accent_default_font_100,
213+
color: COLORS.ACCENT.color_accent_default_icon_150,
205214
},
206215
},
207216
[ButtonStateType.HOVER]: {
208217
...actionCommonProps,
209218
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,
212221
icon: {
213-
color: COLORS.NEUTRAL.color_neutral_font_150,
222+
color: COLORS.PRESSED.color_accent_pressed_icon_100,
214223
},
215224
},
216225
[ButtonStateType.DISABLED]: {
217226
...actionCommonProps,
218227
altVariant: true,
219-
// text_decoration: 'none',
220228
color: COLORS.DISABLED.color_accentDisabled_font_100,
221229
icon: {
222230
color: COLORS.DISABLED.color_accentDisabled_icon_100,

src/designSystem/kubit/components/button/variants.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ export enum ButtonVariantType {
99

1010
export enum ButtonSizeType {
1111
LARGE = 'LARGE',
12+
/**
13+
* @deprecated `MEDIUM` will be removed. Use `LARGE` instead
14+
*/
1215
MEDIUM = 'MEDIUM',
1316
SMALL = 'SMALL',
1417
}

0 commit comments

Comments
 (0)