Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: added support for className to <AnchoredOverlay> #4741

Conversation

Princeyadav05
Copy link
Contributor

@Princeyadav05 Princeyadav05 commented Jul 16, 2024

Closes #4739

This PR adds the ability to apply custom CSS classes to the AnchoredOverlay component's overlay.

Changelog

Changed

  • Updated the AnchoredOverlay component to pass through all overlayProps to the internal Overlay component.

Removed

  • N/A

Rollout strategy

  • Minor release
  • Patch release
  • Major release; if selected, include a written rollout or migration plan
  • None; if selected, include a brief description as to why

This change adds new functionality without breaking existing behavior, making it suitable for a minor release.

Testing & Reviewing

To test this change:

  1. Use the AnchoredOverlay component with a custom class:
    <AnchoredOverlay
      overlayProps={{
        className: "my-custom-overlay-class"
      }}
      // ... other props
    >
      {/* Overlay content */}
    </AnchoredOverlay>

Merge checklist

@Princeyadav05 Princeyadav05 requested a review from a team as a code owner July 16, 2024 10:21
Copy link

changeset-bot bot commented Jul 16, 2024

⚠️ No Changeset found

Latest commit: c1e0161

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Member

@broccolinisoup broccolinisoup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello! Thanks for pushing this PR. There is a type error about the new className prop. Could you please make sure the new prop type is also defined?

@Princeyadav05
Copy link
Contributor Author

Hello! Thanks for pushing this PR. There is a type error about the new className prop. Could you please make sure the new prop type is also defined?

Sure, will look at it today.

@broccolinisoup
Copy link
Member

Hello @Princeyadav05 👋🏻 Let me know if you need a hand with fixing the type issue!

We have another PR raised for the same issue and I am trying to coordinate so that we can have both of your contributions, ideally 😊

@Princeyadav05
Copy link
Contributor Author

Hello @Princeyadav05 👋🏻 Let me know if you need a hand with fixing the type issue!

We have another PR raised for the same issue and I am trying to coordinate so that we can have both of your contributions, ideally 😊

Will try to close it in a couple of hours. Thanks you for your co-ordination. 😊

@Princeyadav05
Copy link
Contributor Author

@broccolinisoup have made the required changes. Do let me know if anything else is required.

Copy link
Member

@broccolinisoup broccolinisoup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Princeyadav05!! 🎉

@broccolinisoup broccolinisoup added this pull request to the merge queue Jul 23, 2024
Merged via the queue into primer:main with commit a9fab98 Jul 23, 2024
30 checks passed
@primer primer bot mentioned this pull request Jul 23, 2024
romanpozdnov added a commit to romanpozdnov/react that referenced this pull request Jul 23, 2024
### description:
- the previous PR, which also included the necessary changes: primer#4741
- only the changes to Storybook were kept
github-merge-queue bot pushed a commit that referenced this pull request Jul 23, 2024
…4752)

* Added className prop to AnchoredOverlay component

### Description:
- Added `className` prop to allow custom styling of the `AnchoredOverlay` component
- This change addresses issue #4739

* Updated AnchoredOverlay documentation to include className prop

### Description:
- Added `className` prop to `AnchoredOverlay.docs.json`

* add changeset

* Revert "add changeset"

This reverts commit 4a59f6a.

* Updated the code according to PR#4741

### description:
- the previous PR, which also included the necessary changes: #4741
- only the changes to Storybook were kept

---------

Co-authored-by: Armagan Ersoz <broccolinisoup@github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for className to <AnchoredOverlay>
2 participants