-
-
Notifications
You must be signed in to change notification settings - Fork 267
[tooltip] Support detached triggers #3071
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
[tooltip] Support detached triggers #3071
Conversation
commit: |
Bundle size report
Check out the code infra dashboard for more information about this PR. |
✅ Deploy Preview for base-ui ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
8d26554 to
28956f3
Compare
ba51271 to
6bc2278
Compare
|
You're right. I updated the animations demo styles. |
| }, | ||
| "defaultTriggerId": { | ||
| "type": "string | null", | ||
| "description": "ID of the trigger that the dialog is associated with.\nThis is useful in conjunction with the `defaultOpen` prop to create an initially open dialog.", |
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.
tooltip
atomiks
left a comment
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.
Wasn't able to find any issues aside from some JSDoc tweaks - animation example looks perfect
e07abbf to
d799e0e
Compare

Implemented detached / multiple trigger support in Tooltip, similarly to #2336
It is now possible to define triggers outside of Tooltip.Root using the handle prop. Multiple triggers per dialog with a dynamic payload are also implemented.
Delay groups created by Tooltip.Provider now apply to triggers (so when using detached triggers make sure the Tooltip.Trigger components are inside the Provider).
delayandcloseDelaywere moved from Tooltip.Root to Tooltip.Trigger, as they can be different per trigger.Playground: https://deploy-preview-3071--base-ui.netlify.app/experiments/tooltip/tooltips
Docs: https://deploy-preview-3071--base-ui.netlify.app/react/components/tooltip#detached-triggers
Closes #3032
Built on top of #3040