Skip to content

Commit 8c36e8c

Browse files
committed
feat(Button): remove vertical paddings
1 parent 47bc357 commit 8c36e8c

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

src/components/actions/Button/Button.tsx

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@ export const DEFAULT_BUTTON_STYLES: Styles = {
4343
focused: '#purple-03',
4444
},
4545
cursor: 'pointer',
46-
gap: '.75x',
46+
gap: {
47+
'': '.75x',
48+
'[data-size="small"]': '.5x',
49+
},
4750
flow: 'column',
4851
preset: {
4952
'': 't3m',
@@ -53,10 +56,10 @@ export const DEFAULT_BUTTON_STYLES: Styles = {
5356
transition: 'theme',
5457
reset: 'button',
5558
padding: {
56-
'': '(1.25x - 1bw) (2x - 1bw)',
57-
'[data-size="small"]': '(.75x - 1bw) (1.25x - 1bw)',
58-
'[data-size="medium"]': '(1.25x - 1bw) (1.75x - 1bw)',
59-
'[data-size="large"]': '1.5x (2.25x - 1bw)',
59+
'': '0 (2x - 1bw)',
60+
'[data-size="small"]': '0 (1x - 1bw)',
61+
'[data-size="medium"]': '0 (1.75x - 1bw)',
62+
'[data-size="large"]': '0 (2.25x - 1bw)',
6063
'single-icon-only | [data-type="link"]': 0,
6164
},
6265
width: {
@@ -67,9 +70,9 @@ export const DEFAULT_BUTTON_STYLES: Styles = {
6770
},
6871
height: {
6972
'': 'initial',
70-
'[data-size="small"] & single-icon-only': '4x 4x',
71-
'[data-size="medium"] & single-icon-only': '5x 5x',
72-
'[data-size="large"] & single-icon-only': '6x 6x',
73+
'[data-size="small"]': '4x 4x',
74+
'[data-size="medium"]': '5x 5x',
75+
'[data-size="large"]': '6x 6x',
7376
},
7477
whiteSpace: 'nowrap',
7578
radius: {
@@ -388,6 +391,7 @@ export const Button = forwardRef(function Button(
388391
() => ({
389392
loading: isLoading,
390393
selected: isSelected,
394+
'with-icons': !!icon || !!rightIcon,
391395
'single-icon-only': singleIcon,
392396
...mods,
393397
}),

0 commit comments

Comments
 (0)