File tree Expand file tree Collapse file tree 1 file changed +24
-22
lines changed
src/components/Glossary/GlossaryTooltip Expand file tree Collapse file tree 1 file changed +24
-22
lines changed Original file line number Diff line number Diff line change 1
1
import React , { ReactNode } from "react"
2
- import { Text , useBreakpointValue } from "@chakra-ui/react"
2
+ import { Box , Text , useBreakpointValue } from "@chakra-ui/react"
3
3
4
4
import GlossaryDefinition from "@/components/Glossary/GlossaryDefinition"
5
5
import Tooltip from "@/components/Tooltip"
@@ -13,28 +13,30 @@ const GlossaryTooltip = ({ children, termKey }: GlossaryTooltipProps) => {
13
13
const isLargeScreen = useBreakpointValue ( { base : false , lg : true } )
14
14
15
15
return isLargeScreen ? (
16
- < Tooltip
17
- content = {
18
- < GlossaryDefinition
19
- term = { termKey }
20
- size = "sm"
21
- options = { { ns : "glossary-tooltip" } }
22
- />
23
- }
24
- >
25
- < Text
26
- as = "u"
27
- textDecorationStyle = "dotted"
28
- textUnderlineOffset = "3px"
29
- _hover = { {
30
- textDecorationColor : "primary.hover" ,
31
- color : "primary.hover" ,
32
- } }
33
- cursor = "help"
16
+ < Box display = "inline-block" >
17
+ < Tooltip
18
+ content = {
19
+ < GlossaryDefinition
20
+ term = { termKey }
21
+ size = "sm"
22
+ options = { { ns : "glossary-tooltip" } }
23
+ />
24
+ }
34
25
>
35
- { children }
36
- </ Text >
37
- </ Tooltip >
26
+ < Text
27
+ as = "u"
28
+ textDecorationStyle = "dotted"
29
+ textUnderlineOffset = "3px"
30
+ _hover = { {
31
+ textDecorationColor : "primary.hover" ,
32
+ color : "primary.hover" ,
33
+ } }
34
+ cursor = "help"
35
+ >
36
+ { children }
37
+ </ Text >
38
+ </ Tooltip >
39
+ </ Box >
38
40
) : (
39
41
< Text as = "span" > { children } </ Text >
40
42
)
You can’t perform that action at this time.
0 commit comments