From 4449f5bc50ae7f9942ea4c16fdbf25e601e62a84 Mon Sep 17 00:00:00 2001 From: Tariq Hassan Date: Thu, 28 Sep 2023 11:58:26 +0200 Subject: [PATCH] Fixes missing className prop passed to the Popover component --- .changeset/popular-bobcats-learn.md | 5 +++++ packages/circuit-ui/components/Popover/Popover.tsx | 8 +++++++- 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 .changeset/popular-bobcats-learn.md 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 = ({