From b7aa886822287cec6d21fae13fb2696028397aeb Mon Sep 17 00:00:00 2001 From: Roman Pozdnov Date: Thu, 18 Jul 2024 22:02:30 +0300 Subject: [PATCH 1/5] Added className prop to AnchoredOverlay component ### Description: - Added `className` prop to allow custom styling of the `AnchoredOverlay` component - This change addresses issue #4739 --- packages/react/src/AnchoredOverlay/AnchoredOverlay.tsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/react/src/AnchoredOverlay/AnchoredOverlay.tsx b/packages/react/src/AnchoredOverlay/AnchoredOverlay.tsx index f7d60df9d6b..e3f5bbe02c4 100644 --- a/packages/react/src/AnchoredOverlay/AnchoredOverlay.tsx +++ b/packages/react/src/AnchoredOverlay/AnchoredOverlay.tsx @@ -79,6 +79,11 @@ interface AnchoredOverlayBaseProps extends Pick + + /** + * Class name for custom styling + */ + className?: string } export type AnchoredOverlayProps = AnchoredOverlayBaseProps & @@ -102,6 +107,7 @@ export const AnchoredOverlay: React.FC Date: Thu, 18 Jul 2024 22:28:24 +0300 Subject: [PATCH 2/5] Updated AnchoredOverlay documentation to include className prop ### Description: - Added `className` prop to `AnchoredOverlay.docs.json` --- .../react/src/AnchoredOverlay/AnchoredOverlay.docs.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/react/src/AnchoredOverlay/AnchoredOverlay.docs.json b/packages/react/src/AnchoredOverlay/AnchoredOverlay.docs.json index 7bba608c913..d8683ed5dc1 100644 --- a/packages/react/src/AnchoredOverlay/AnchoredOverlay.docs.json +++ b/packages/react/src/AnchoredOverlay/AnchoredOverlay.docs.json @@ -83,6 +83,12 @@ "type": "Partial", "defaultValue": "", "description": "Settings to apply to the focus zone on the internal `Overlay` component." + }, + { + "name": "className", + "type": "string", + "defaultValue": "", + "description": "Class name for custom styling." } ] } From 4a59f6a984a912552adf0cfea49ca67848c43514 Mon Sep 17 00:00:00 2001 From: Armagan Ersoz Date: Tue, 23 Jul 2024 15:22:30 +1000 Subject: [PATCH 3/5] add changeset --- .changeset/mean-islands-repair.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/mean-islands-repair.md diff --git a/.changeset/mean-islands-repair.md b/.changeset/mean-islands-repair.md new file mode 100644 index 00000000000..8def67cea5b --- /dev/null +++ b/.changeset/mean-islands-repair.md @@ -0,0 +1,5 @@ +--- +'@primer/react': patch +--- + +AnchoredOverlay: Add 'className' prop to the component From f3d900a5c6509aaf5a81babef02b1d1cc7415f43 Mon Sep 17 00:00:00 2001 From: Armagan Ersoz Date: Tue, 23 Jul 2024 15:23:31 +1000 Subject: [PATCH 4/5] Revert "add changeset" This reverts commit 4a59f6a984a912552adf0cfea49ca67848c43514. --- .changeset/mean-islands-repair.md | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 .changeset/mean-islands-repair.md diff --git a/.changeset/mean-islands-repair.md b/.changeset/mean-islands-repair.md deleted file mode 100644 index 8def67cea5b..00000000000 --- a/.changeset/mean-islands-repair.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@primer/react': patch ---- - -AnchoredOverlay: Add 'className' prop to the component From cfb1c8735774616b2434ad7ca11fc7549ff7d895 Mon Sep 17 00:00:00 2001 From: Roman Pozdnov Date: Tue, 23 Jul 2024 16:31:09 +0300 Subject: [PATCH 5/5] Updated the code according to PR#4741 ### description: - the previous PR, which also included the necessary changes: https://github.com/primer/react/pull/4741 - only the changes to Storybook were kept --- packages/react/src/AnchoredOverlay/AnchoredOverlay.tsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/react/src/AnchoredOverlay/AnchoredOverlay.tsx b/packages/react/src/AnchoredOverlay/AnchoredOverlay.tsx index a7c870721c5..88260c2c8a2 100644 --- a/packages/react/src/AnchoredOverlay/AnchoredOverlay.tsx +++ b/packages/react/src/AnchoredOverlay/AnchoredOverlay.tsx @@ -107,7 +107,6 @@ export const AnchoredOverlay: React.FC