-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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(components): you can now place a close button within the popover #2275
feat(components): you can now place a close button within the popover #2275
Conversation
🦋 Changeset detectedLatest commit: 04e69be The changes in this PR will be included in the next version bump. This PR includes changesets to release 6 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@kght6123 is attempting to deploy a commit to the NextUI Team on Vercel. A member of the Team first needs to authorize it. |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Update changeset. Co-authored-by: Junior Garcia <[email protected]>
@kght6123 can you resolve the conflicts and add some tests? |
WalkthroughThe updates primarily focus on enhancing the Changes
Assessment against linked issues
Recent Review DetailsConfiguration used: .coderabbit.yaml Files selected for processing (1)
Files skipped from review as they are similar to previous changes (1)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@wingkwong What are tests? Where and what kind of tests should I add? |
@kght6123 See |
@wingkwong I've got it. thank you. |
Closing due to inactivity. |
Closes #2270
📝 Description
You can now place a close button within the popover.
⛳️ Current behavior (updates)
Currently, when a function is specified in
children
, it only hastitleProps
as an argument. Therefore, I have addedonClose
as a second argument.🚀 New behavior
By adding
onClose
to the arguments of the function that can be passed tochildren
inpopover-content.tsx
, you can now add a close process to any button or similar element.I have also corrected the onClose of the DismissButton, which is added for accessibility, since its closing process is different from that of clicking the background of the Popover. This difference might cause issues on touch devices as mentioned in the issue.
https://react-spectrum.adobe.com/react-aria/usePopover.html#example
💣 Is this a breaking change (Yes/No):
No
📝 Additional Information
Nothing.
Summary by CodeRabbit
New Features
onClose
button for better demonstration and testing.Enhancements
Refactor
PopoverContent
component to support passing anonClose
function, improving component flexibility and functionality.