File tree Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Original file line number Diff line number Diff line change 1
1
import { useRouter } from "next/router"
2
- import { Box , Text } from "@chakra-ui/react"
3
2
3
+ import { cn } from "@/lib/utils/cn"
4
4
import { cleanPath } from "@/lib/utils/url"
5
5
6
6
import type { Level , NavItem } from "../types"
7
7
8
- import { useNavMenuColors } from "@/hooks/useNavMenuColors "
8
+ import { useNavMenuColorsTw } from "@/hooks/useNavMenuColorsTw "
9
9
10
10
type ItemProps = {
11
11
item : NavItem
@@ -15,23 +15,23 @@ type ItemProps = {
15
15
const ItemContent = ( { item, lvl } : ItemProps ) => {
16
16
const { label, description, ...action } = item
17
17
const { asPath } = useRouter ( )
18
- const menuColors = useNavMenuColors ( )
18
+ const menuColors = useNavMenuColorsTw ( )
19
19
20
20
const isLink = "href" in action
21
21
const isActivePage = isLink && cleanPath ( asPath ) === action . href
22
22
23
23
return (
24
- < Box me = " auto" textAlign = " start" position = "relative ">
25
- < Text fontWeight = " bold" color = { menuColors . body } >
26
- { label }
27
- </ Text >
28
- < Text
29
- fontSize = "sm"
30
- color = { isActivePage ? menuColors . body : menuColors . lvl [ lvl ] . subtext }
24
+ < div className = "relative me- auto text- start">
25
+ < p className = { cn ( "font- bold text-body" , menuColors . body ) } > { label } </ p >
26
+ < p
27
+ className = { cn (
28
+ "text-sm" ,
29
+ isActivePage ? menuColors . body : menuColors . lvl [ lvl ] . subtext
30
+ ) }
31
31
>
32
32
{ description }
33
- </ Text >
34
- </ Box >
33
+ </ p >
34
+ </ div >
35
35
)
36
36
}
37
37
You can’t perform that action at this time.
0 commit comments