File tree Expand file tree Collapse file tree 1 file changed +21
-18
lines changed Expand file tree Collapse file tree 1 file changed +21
-18
lines changed Original file line number Diff line number Diff line change 8
8
PopoverHeader ,
9
9
PopoverCloseButton ,
10
10
Flex ,
11
+ Portal ,
11
12
} from "@chakra-ui/react"
12
13
import React , { type ReactNode } from "react"
13
14
@@ -26,24 +27,26 @@ export const NotificationPopover: React.FC<IProps> = ({
26
27
return (
27
28
< Popover placement = { placement } >
28
29
< PopoverTrigger > { children } </ PopoverTrigger >
29
- < PopoverContent
30
- bg = "background.highlight"
31
- px = { 4 }
32
- py = { 2 }
33
- maxW = "15rem"
34
- borderRadius = "base"
35
- boxShadow = "tooltip"
36
- fontSize = "xs"
37
- { ...restProps }
38
- >
39
- < Flex gap = { 2 } zIndex = { 100000000 } >
40
- < PopoverHeader fontWeight = "bold" mb = { 2 } flex = { 1 } mt = { 0.5 } >
41
- { title || "" }
42
- </ PopoverHeader >
43
- < PopoverCloseButton ms = "auto" />
44
- </ Flex >
45
- < PopoverBody > { content } </ PopoverBody >
46
- </ PopoverContent >
30
+ < Portal >
31
+ < PopoverContent
32
+ bg = "background.highlight"
33
+ px = { 4 }
34
+ py = { 2 }
35
+ maxW = "15rem"
36
+ borderRadius = "base"
37
+ boxShadow = "tooltip"
38
+ fontSize = "xs"
39
+ { ...restProps }
40
+ >
41
+ < Flex gap = { 2 } zIndex = { 100000000 } >
42
+ < PopoverHeader fontWeight = "bold" mb = { 2 } flex = { 1 } mt = { 0.5 } >
43
+ { title || "" }
44
+ </ PopoverHeader >
45
+ < PopoverCloseButton ms = "auto" />
46
+ </ Flex >
47
+ < PopoverBody > { content } </ PopoverBody >
48
+ </ PopoverContent >
49
+ </ Portal >
47
50
</ Popover >
48
51
)
49
52
}
You can’t perform that action at this time.
0 commit comments