Skip to content

Commit 4efe462

Browse files
authored
fix: merge the wrapper with the anchor
1 parent fa49c77 commit 4efe462

File tree

1 file changed

+10
-14
lines changed

1 file changed

+10
-14
lines changed

src/components/HubButton.tsx

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,21 @@ const parseInlineStyle = (style: string) => {
99
.reduce((acc, [key, value]) => ({ ...acc, [key]: value }), {})
1010
}
1111

12-
const StyledWrapper = styled.div`
12+
const StyledButton = styled.a`
1313
display: flex;
1414
align-items: center;
1515
height: 44px;
1616
padding: 0 12px;
1717
background-color: #54b4cd;
1818
border-radius: 8px;
19-
`
20-
21-
const StyledButton = styled.a`
22-
display: inline-block;
23-
margin-bottom: 1px;
2419
font-size: 1rem;
2520
font-weight: 700;
2621
text-decoration: none;
2722
color: #ffffff;
2823
position: relative;
2924
30-
label {
31-
cursor: pointer;
32-
text-align: center;
25+
span {
26+
margin-bottom: 1px;
3327
}
3428
3529
&:hover {
@@ -39,11 +33,13 @@ const StyledButton = styled.a`
3933

4034
const HubButton = ({ style }: { style?: string }) => {
4135
return (
42-
<StyledWrapper style={style ? parseInlineStyle(style) : {}}>
43-
<StyledButton href="https://traefik.io/upgrade-traefik" target="_blank">
44-
Upgrade
45-
</StyledButton>
46-
</StyledWrapper>
36+
<StyledButton
37+
href="https://traefik.io/upgrade-traefik"
38+
target="_blank"
39+
style={style ? parseInlineStyle(style) : {}}
40+
>
41+
<span>Upgrade</span>
42+
</StyledButton>
4743
)
4844
}
4945

0 commit comments

Comments
 (0)