Skip to content

Commit d83976b

Browse files
authored
Merge pull request #101 from Giveth/fix-button-hover
Fix button hover
2 parents d08786e + f3e9fab commit d83976b

File tree

5 files changed

+36
-43
lines changed

5 files changed

+36
-43
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@giveth/ui-design-system",
3-
"version": "1.11.26",
3+
"version": "1.11.27",
44
"files": [
55
"/lib"
66
],

src/components/buttonLinks/ButtonLink.tsx

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -22,92 +22,92 @@ const ButtonLinkContainer = styled.span<IButtonLinkContainerProps>`
2222
? css`
2323
color: ${brandColors.giv[400]};
2424
background-color: ${brandColors.giv[500]};
25-
`
25+
`
2626
: css`
2727
color: ${neutralColors.gray[100]};
2828
background-color: ${brandColors.pinky[500]};
29-
`;
29+
`;
3030
case 'secondary':
3131
return props.disabled
3232
? css`
3333
color: ${brandColors.giv[400]};
3434
background-color: ${brandColors.giv[500]};
35-
`
35+
`
3636
: css`
3737
color: ${neutralColors.gray[100]};
3838
background-color: ${brandColors.giv[500]};
39-
`;
39+
`;
4040
case 'texty':
4141
return props.disabled
4242
? css`
4343
color: ${brandColors.giv[500]};
4444
background-color: unset;
4545
padding: 8px 24px;
46-
`
46+
`
4747
: css`
4848
color: ${brandColors.deep[100]};
4949
background-color: unset;
5050
padding: 8px 24px;
51-
`;
51+
`;
5252
case 'texty-gray':
5353
return props.disabled
5454
? css`
5555
color: ${neutralColors.gray[500]};
5656
background-color: unset;
5757
padding: 8px 24px;
5858
opacity: 0.5;
59-
`
59+
`
6060
: css`
6161
color: ${neutralColors.gray[500]};
6262
background-color: unset;
6363
padding: 8px 24px;
64-
`;
64+
`;
6565
case 'texty-primary':
6666
return props.disabled
6767
? css`
6868
color: ${brandColors.pinky[500]};
6969
background-color: unset;
7070
padding: 8px 24px;
7171
opacity: 0.5;
72-
`
72+
`
7373
: css`
7474
color: ${brandColors.pinky[500]};
7575
background-color: unset;
7676
padding: 8px 24px;
77-
`;
77+
`;
7878
case 'texty-secondary':
7979
return props.disabled
8080
? css`
8181
color: ${brandColors.giv[500]};
8282
background-color: unset;
8383
padding: 8px 24px;
8484
opacity: 0.5;
85-
`
85+
`
8686
: css`
8787
color: ${brandColors.giv[500]};
8888
background-color: unset;
8989
padding: 8px 24px;
90-
`;
90+
`;
9191
9292
default:
9393
return props.disabled
9494
? css`
9595
color: ${brandColors.giv[400]};
9696
background-color: ${brandColors.giv[500]};
97-
`
97+
`
9898
: css`
9999
color: ${neutralColors.gray[100]};
100100
background-color: ${brandColors.pinky[500]};
101-
`;
101+
`;
102102
}
103103
}}
104104
${props =>
105105
props.disabled
106106
? ''
107107
: css`
108108
cursor: pointer;
109-
`}
110-
:hover {
109+
`}
110+
&:hover {
111111
${props => {
112112
if (props.disabled) return '';
113113
switch (props.$linkType) {

src/components/buttonLinks/OutlineButtonLink.tsx

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@ const ButtonLinkContainer = styled.span<IButtonLinkContainerProps>`
99
border: 2px solid;
1010
border-radius: 48px;
1111
padding: ${props => (props.size === 'large' ? '22px' : '14px')} 24px;
12-
transition:
13-
color 0.3s ease,
14-
border-color 0.3s ease,
12+
transition: color 0.3s ease, border-color 0.3s ease,
1513
background-color 0.3s ease;
1614
background-color: unset;
1715
display: flex;
@@ -26,35 +24,35 @@ const ButtonLinkContainer = styled.span<IButtonLinkContainerProps>`
2624
? css`
2725
color: ${brandColors.giv[500]};
2826
border-color: ${brandColors.giv[500]};
29-
`
27+
`
3028
: css`
3129
color: ${brandColors.pinky[400]};
3230
border-color: ${brandColors.pinky[400]};
33-
`;
31+
`;
3432
case 'secondary':
3533
return props.disabled
3634
? css`
3735
color: ${brandColors.giv[500]};
3836
border-color: ${brandColors.giv[500]};
39-
`
37+
`
4038
: css`
4139
color: ${brandColors.giv['000']};
4240
border-color: ${brandColors.giv['000']};
43-
`;
41+
`;
4442
default:
4543
return props.disabled
4644
? css`
4745
color: ${brandColors.giv[500]};
4846
border-color: ${brandColors.giv[500]};
49-
`
47+
`
5048
: css`
5149
color: ${brandColors.pinky[400]};
5250
border-color: ${brandColors.pinky[400]};
53-
`;
51+
`;
5452
}
5553
}}
5654
${props => (props.disabled ? '' : 'cursor: pointer;')}
57-
:hover {
55+
&:hover {
5856
${props => {
5957
if (props.disabled) return '';
6058
switch (props.$linkType) {

src/components/buttons/Button.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,7 @@ const ButtonContainer = styled.button<IButtonContainerProps>`
1010
border: 0 solid;
1111
border-radius: 48px;
1212
padding: ${props => (props.size === 'large' ? '24px' : '16px')} 24px;
13-
transition:
14-
background-color 0.3s ease,
15-
color 0.3s ease,
16-
opacity 0.3s ease;
13+
transition: background-color 0.3s ease, color 0.3s ease, opacity 0.3s ease;
1714
display: flex;
1815
justify-content: center;
1916
align-items: center;
@@ -109,7 +106,7 @@ const ButtonContainer = styled.button<IButtonContainerProps>`
109106
}
110107
}}
111108
${props => (props.disabled ? '' : 'cursor: pointer;')}
112-
:hover {
109+
&:hover {
113110
${props => {
114111
if (props.disabled) return '';
115112
switch (props.$buttonType) {

src/components/buttons/OutlineButton.tsx

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@ const ButtonContainer = styled.button<IButtonContainerProps>`
1010
border: 2px solid;
1111
border-radius: 48px;
1212
padding: ${props => (props.size === 'large' ? '22px' : '14px')} 24px;
13-
transition:
14-
color 0.3s ease,
15-
border-color 0.3s ease,
13+
transition: color 0.3s ease, border-color 0.3s ease,
1614
background-color 0.3s ease;
1715
background: unset;
1816
display: flex;
@@ -28,42 +26,42 @@ const ButtonContainer = styled.button<IButtonContainerProps>`
2826
? css`
2927
color: ${brandColors.pinky[300]};
3028
border-color: ${brandColors.pinky[300]};
31-
`
29+
`
3230
: css`
3331
color: ${brandColors.pinky[400]};
3432
border-color: ${brandColors.pinky[400]};
35-
`;
33+
`;
3634
case 'secondary':
3735
return props.disabled
3836
? css`
3937
color: ${brandColors.giv[500]};
4038
border-color: ${brandColors.giv[500]};
4139
opacity: 0.4;
42-
`
40+
`
4341
: css`
4442
color: ${brandColors.giv['000']};
4543
border-color: ${brandColors.giv['000']};
46-
`;
44+
`;
4745
default:
4846
return props.disabled
4947
? css`
5048
color: ${brandColors.giv[500]};
5149
border-color: ${brandColors.giv[500]};
5250
opacity: 0.4;
53-
`
51+
`
5452
: css`
5553
color: ${brandColors.pinky[400]};
5654
border-color: ${brandColors.pinky[400]};
57-
`;
55+
`;
5856
}
5957
}}
6058
${props =>
6159
props.disabled
6260
? ''
6361
: css`
6462
cursor: pointer;
65-
`}
66-
:hover {
63+
`}
64+
&:hover {
6765
${props => {
6866
if (props.disabled) return '';
6967
switch (props.$buttonType) {

0 commit comments

Comments
 (0)