1
1
import { useRouter } from "next/router"
2
2
import { FaGithub } from "react-icons/fa"
3
- import { Center , Flex , Icon } from "@chakra-ui/react"
3
+
4
+ import { Center , Flex } from "@/components/ui/flex"
5
+ import { BaseLink , LinkProps } from "@/components/ui/Link"
4
6
5
7
import Emoji from "./Emoji"
6
- import { BaseLink , LinkProps } from "./Link"
7
- import Text from "./OldText"
8
8
9
9
type GitHubRepo = {
10
10
stargazerCount : number
@@ -25,45 +25,23 @@ const GitStars = ({ gitHubRepo, hideStars, ...props }: GitStarsProps) => {
25
25
26
26
return (
27
27
< BaseLink
28
+ className = "ms-auto text-body no-underline hover:underline"
28
29
href = { gitHubRepo . url }
29
30
hideArrow
30
- ms = "auto"
31
- textDecoration = "none"
32
31
{ ...props }
33
32
>
34
- < Flex
35
- background = "lightBorder"
36
- textDecoration = "none"
37
- border = "1px solid"
38
- borderColor = "lightBorder"
39
- borderRadius = "base"
40
- color = "text"
41
- _hover = { {
42
- boxShadow : "0 0 1px var(--eth-colors-primary-base)" ,
43
- path : { fill : "primary.base" } ,
44
- } }
45
- >
33
+ < Flex className = "items-stretch overflow-hidden rounded bg-background-medium" >
46
34
{ hideStars ? (
47
- < Icon as = { FaGithub } m = { 1 } />
35
+ < FaGithub className = "m-1 text-2xl" />
48
36
) : (
49
37
< >
50
- < Center
51
- w = "36px"
52
- justifyContent = "space-between"
53
- fontSize = "s"
54
- mx = "0.325rem"
55
- >
56
- < Icon as = { FaGithub } />
38
+ < Center className = "mx-1.5 w-9 justify-between text-2xl" >
39
+ < FaGithub />
57
40
< Emoji text = ":star:" />
58
41
</ Center >
59
- < Text
60
- fontSize = "0.8125rem"
61
- px = "0.325rem"
62
- my = "0"
63
- background = "searchBackgroundEmpty"
64
- >
65
- { starsString }
66
- </ Text >
42
+ < Flex className = "items-center bg-background-highlight px-1.5" >
43
+ < p className = "my-0 text-xs text-body" > { starsString } </ p >
44
+ </ Flex >
67
45
</ >
68
46
) }
69
47
</ Flex >
0 commit comments