1
1
import React from "react"
2
2
import { useTranslation } from "gatsby-plugin-react-i18next"
3
- import styled from "@emotion/styled"
4
3
import { graphql , useStaticQuery } from "gatsby"
5
- import { FlexProps } from "@chakra-ui/react"
4
+ import { Flex , FlexProps } from "@chakra-ui/react"
6
5
7
6
import ButtonLink from "../ButtonLink"
8
7
import CalloutBanner from "../CalloutBanner"
@@ -11,20 +10,6 @@ import Translation from "../Translation"
11
10
import { trackCustomEvent } from "../../utils/matomo"
12
11
import { getImage } from "../../utils/image"
13
12
14
- const ButtonContainer = styled . div `
15
- display: flex;
16
- gap: 1rem;
17
- @media (max-width: ${ ( { theme } ) => theme . breakpoints . m } ) {
18
- flex-direction: column;
19
- }
20
- `
21
-
22
- const StyledButtonLink = styled ( ButtonLink ) `
23
- @media (max-width: ${ ( { theme } ) => theme . breakpoints . s } ) {
24
- width: 100%;
25
- }
26
- `
27
-
28
13
export interface IProps extends FlexProps {
29
14
id ?: string
30
15
}
@@ -54,8 +39,8 @@ const StakingCommunityCallout: React.FC<IProps> = (props) => {
54
39
titleKey = { "page-staking-join-community" }
55
40
descriptionKey = { "page-staking-join-community-desc" }
56
41
>
57
- < ButtonContainer >
58
- < StyledButtonLink
42
+ < Flex gap = { 4 } direction = { { base : "column" , md : "row" } } >
43
+ < ButtonLink
59
44
onClick = { ( ) => {
60
45
trackCustomEvent ( {
61
46
eventCategory : `StakingCommunityCallout` ,
@@ -64,10 +49,11 @@ const StakingCommunityCallout: React.FC<IProps> = (props) => {
64
49
} )
65
50
} }
66
51
to = "https://discord.io/ethstaker"
52
+ w = { { base : "full" , md : "auto" } }
67
53
>
68
54
Discord
69
- </ StyledButtonLink >
70
- < StyledButtonLink
55
+ </ ButtonLink >
56
+ < ButtonLink
71
57
onClick = { ( ) => {
72
58
trackCustomEvent ( {
73
59
eventCategory : `StakingCommunityCallout` ,
@@ -76,10 +62,11 @@ const StakingCommunityCallout: React.FC<IProps> = (props) => {
76
62
} )
77
63
} }
78
64
to = "https://reddit.com/r/ethstaker"
65
+ w = { { base : "full" , md : "auto" } }
79
66
>
80
67
Reddit
81
- </ StyledButtonLink >
82
- < StyledButtonLink
68
+ </ ButtonLink >
69
+ < ButtonLink
83
70
onClick = { ( ) => {
84
71
trackCustomEvent ( {
85
72
eventCategory : `StakingCommunityCallout` ,
@@ -88,10 +75,11 @@ const StakingCommunityCallout: React.FC<IProps> = (props) => {
88
75
} )
89
76
} }
90
77
to = "https://ethstaker.cc"
78
+ w = { { base : "full" , md : "auto" } }
91
79
>
92
80
< Translation id = "rollup-component-website" />
93
- </ StyledButtonLink >
94
- </ ButtonContainer >
81
+ </ ButtonLink >
82
+ </ Flex >
95
83
</ CalloutBanner >
96
84
)
97
85
}
0 commit comments