@@ -9,23 +9,14 @@ type ButtonProps = {
99} ;
1010
1111function Button ( { href, children, margin = '0' } : ButtonProps ) : ReactNode {
12- return (
12+ return (
1313 < a
14- href = { href }
15- target = "_blank"
16- rel = "noopener noreferrer"
17- style = { {
18- display : 'inline-block' ,
19- padding : '8px 12px' ,
20- margin : margin ,
21- borderRadius : '4px' ,
22- textDecoration : 'none' ,
23- border : '1px solid #ccc' ,
24- color : 'var(--ifm-color-default)' ,
25- fontSize : '0.85rem' ,
26- } }
27- >
28- { children }
14+ href = { href }
15+ target = '_blank'
16+ rel = 'noopener noreferrer'
17+ className = 'button-interactive'
18+ >
19+ { children }
2920 </ a >
3021 ) ;
3122}
@@ -38,7 +29,7 @@ type GitHubButtonProps = {
3829function GitHubButton ( { url, margin = '0' } : GitHubButtonProps ) : ReactNode {
3930 return (
4031 < Button href = { url } margin = { margin } >
41- < FaGithub style = { { marginRight : '8px' , verticalAlign : 'middle' , fontSize : '1rem' } } />
32+ < FaGithub className = 'icon-button' />
4233 View on GitHub
4334 </ Button >
4435 ) ;
@@ -52,7 +43,7 @@ type YouTubeButtonProps = {
5243function YouTubeButton ( { url, margin = '0' } : YouTubeButtonProps ) : ReactNode {
5344 return (
5445 < Button href = { url } margin = { margin } >
55- < FaYoutube style = { { marginRight : '8px' , verticalAlign : 'middle' , fontSize : '1rem' } } />
46+ < FaYoutube className = 'icon-button' />
5647 Watch on YouTube
5748 </ Button >
5849 ) ;
0 commit comments