File tree Expand file tree Collapse file tree 2 files changed +31
-0
lines changed
packages/react/src/Popover Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,10 @@ const stories = [
15
15
title : 'SX Props' ,
16
16
id : 'components-popover-dev--sx-props' ,
17
17
} ,
18
+ {
19
+ title : 'Popover Overflow' ,
20
+ id : 'components-popover-dev--popover-overflow' ,
21
+ } ,
18
22
] as const
19
23
20
24
test . describe ( 'Popover' , ( ) => {
Original file line number Diff line number Diff line change @@ -9,6 +9,33 @@ export default {
9
9
component : Popover ,
10
10
} as Meta < typeof Popover >
11
11
12
+ export const SxProps = ( ) => (
13
+ < Popover
14
+ relative
15
+ open = { true }
16
+ caret = "top-right"
17
+ sx = { {
18
+ left : '50%' ,
19
+ transform : 'translateX(-50%)' ,
20
+ mt : 2 ,
21
+ color : 'var(--bgColor-danger-muted)' ,
22
+ } }
23
+ style = { { padding : '16px' } }
24
+ >
25
+ < Popover . Content
26
+ sx = { {
27
+ minWidth : '260px' ,
28
+ width : '40%' ,
29
+ } }
30
+ style = { { padding : '32px' } }
31
+ >
32
+ < Heading sx = { { fontSize : 2 } } > Popover heading</ Heading >
33
+ < Text as = "p" > Message about popovers</ Text >
34
+ < Button > Got it!</ Button >
35
+ </ Popover . Content >
36
+ </ Popover >
37
+ )
38
+
12
39
export const PopoverOverflow = ( ) => (
13
40
< Popover relative open = { true } >
14
41
< Popover . Content height = { 'small' } >
You can’t perform that action at this time.
0 commit comments