File tree Expand file tree Collapse file tree 2 files changed +27
-2
lines changed
pattern-library/components/patterns/feedback Expand file tree Collapse file tree 2 files changed +27
-2
lines changed Original file line number Diff line number Diff line change @@ -260,9 +260,17 @@ function useOnClose(
260260
261261export type PopoverProps = {
262262 children ?: ComponentChildren ;
263- classes ?: string | string [ ] ;
264263 variant ?: 'panel' | 'custom' ;
265264
265+ /**
266+ * Additional classes to be passed to the first child element of the popover,
267+ * the one directly wrapping `children`.
268+ */
269+ classes ?: string | string [ ] ;
270+
271+ /** Additional classes to be passed to the outermost element */
272+ containerClasses ?: string | string [ ] ;
273+
266274 /** Ref for the popover element. */
267275 elementRef ?: RefObject < HTMLElement > ;
268276
@@ -386,6 +394,7 @@ export default function Popover({
386394 placement = 'below' ,
387395 arrow = false ,
388396 classes,
397+ containerClasses,
389398 variant = 'panel' ,
390399 onScroll,
391400 elementRef,
@@ -429,6 +438,7 @@ export default function Popover({
429438 'right-0' : align === 'right' ,
430439 'min-w-full' : true ,
431440 } ,
441+ containerClasses ,
432442 ) }
433443 ref = { downcastRef ( popoverRef ) }
434444 popover = { asNativePopover && 'auto' }
Original file line number Diff line number Diff line change @@ -136,7 +136,22 @@ export default function PopoverPage() {
136136 < Library . SectionL3 title = "classes" >
137137 < Library . Info >
138138 < Library . InfoItem label = "description" >
139- Additional CSS classes to pass to the popover.
139+ Additional CSS classes to pass to the popover{ "'" } s first child,
140+ the one directly wrapping `children`.
141+ </ Library . InfoItem >
142+ < Library . InfoItem label = "type" >
143+ < code > string | string[]</ code >
144+ </ Library . InfoItem >
145+ < Library . InfoItem label = "default" >
146+ < code > undefined</ code >
147+ </ Library . InfoItem >
148+ </ Library . Info >
149+ </ Library . SectionL3 >
150+ < Library . SectionL3 title = "containerClasses" >
151+ < Library . Info >
152+ < Library . InfoItem label = "description" >
153+ Additional CSS classes to pass to the popover{ "'" } s outermost
154+ element.
140155 </ Library . InfoItem >
141156 < Library . InfoItem label = "type" >
142157 < code > string | string[]</ code >
You can’t perform that action at this time.
0 commit comments