diff --git a/.changeset/popular-bobcats-learn.md b/.changeset/popular-bobcats-learn.md new file mode 100644 index 0000000000..66c047f73e --- /dev/null +++ b/.changeset/popular-bobcats-learn.md @@ -0,0 +1,5 @@ +--- +'@sumup/circuit-ui': patch +--- + +Fixes missing className prop passed to the Popover component \ No newline at end of file diff --git a/packages/circuit-ui/components/Popover/Popover.tsx b/packages/circuit-ui/components/Popover/Popover.tsx index 751cf666b8..b56e65663a 100644 --- a/packages/circuit-ui/components/Popover/Popover.tsx +++ b/packages/circuit-ui/components/Popover/Popover.tsx @@ -115,6 +115,11 @@ function isDivider(action: Action): action is Divider { type OnToggle = (open: boolean | ((prevOpen: boolean) => boolean)) => void; export interface PopoverProps { + /** + * The class name to add to the Popover wrapper element. + * Defaults to ''. + */ + className?: string; /** * Determines whether the Popover is open or closed. */ @@ -168,6 +173,7 @@ export const Popover = ({ fallbackPlacements = ['top', 'right', 'left'], component: Component, offset, + className = '', ...props }: PopoverProps): JSX.Element | null => { const zIndex = useStackContext(); @@ -303,7 +309,7 @@ export const Popover = ({