diff --git a/src/components/popover/Popover.tsx b/src/components/popover/Popover.tsx index 9433aa72..e17fc786 100644 --- a/src/components/popover/Popover.tsx +++ b/src/components/popover/Popover.tsx @@ -62,6 +62,11 @@ export interface PopoverProps { * CSS class name(s) to apply to the Popover container */ className?: string; + /** + * Extra attributes forwarded directly to the popover content panel. + * Use this to pass `data-*` attributes without polluting the component's own props. + */ + contentProps?: Record; /** * Optional text content of a subtle paragraph, for the body of the Popover */ @@ -106,6 +111,7 @@ export const PopoverRoot = forwardRef((props, r align, children, className, + contentProps, description, disableOutsideClick, extraContent, @@ -129,6 +135,7 @@ export const PopoverRoot = forwardRef((props, r ; +type SelectedPopoverProps = Omit< + PopoverProps, + 'isOpen' | 'onOpenChange' | 'disableOutsideClick' | 'contentProps' +>; type RequiredPopoverProps = Required>; export interface TeachingBubbleProps extends SelectedPopoverProps, RequiredPopoverProps { @@ -52,8 +55,10 @@ export function TeachingBubbleRoot(props: Readonly) { return (