Skip to content

Commit 9df2974

Browse files
refactor(doc-link): apply useToken for boxShadow color
1 parent 0598bf8 commit 9df2974

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

src/components/DocLink.tsx

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
import React from "react"
2-
import { Icon, Box, Text, Flex, LinkBox, LinkOverlay } from "@chakra-ui/react"
2+
import {
3+
Icon,
4+
Box,
5+
Text,
6+
Flex,
7+
LinkBox,
8+
LinkOverlay,
9+
useToken,
10+
} from "@chakra-ui/react"
311
import { AiOutlineArrowRight } from "react-icons/ai"
412
import Emoji from "./Emoji"
513
import Link from "./Link"
@@ -11,6 +19,8 @@ export interface IProps {
1119
}
1220

1321
const DocLink: React.FC<IProps> = ({ to, children, isExternal = false }) => {
22+
const linkBoxShadowColor = useToken("colors", "primary")
23+
1424
return (
1525
<LinkBox
1626
padding={4}
@@ -22,7 +32,7 @@ const DocLink: React.FC<IProps> = ({ to, children, isExternal = false }) => {
2232
_hover={{
2333
background: "tableBackgroundHover",
2434
borderRadius: "base",
25-
boxShadow: "0 0 1px var(--eth-colors-primary)",
35+
boxShadow: `0 0 1px ${linkBoxShadowColor}`,
2636
}}
2737
>
2838
<Flex

0 commit comments

Comments
 (0)