-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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(component): new hook to open confirm modal #6342
feat(component): new hook to open confirm modal #6342
Conversation
Your org has enabled the Graphite merge queue for merging into canaryYou must have a Graphite account in order to use the merge queue. Sign up using this link. You can enable merging using labels in your Graphite merge queue settings. |
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @CatsJuice and the rest of your teammates on |
☁️ Nx Cloud ReportCI is running/has finished running commands for commit d412635. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this CI Pipeline Execution ✅ Successfully ran 6 targets
Sent with 💌 from NxCloud. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## canary #6342 +/- ##
==========================================
- Coverage 62.54% 62.41% -0.14%
==========================================
Files 510 510
Lines 23602 23626 +24
Branches 2225 2226 +1
==========================================
- Hits 14762 14746 -16
- Misses 8578 8618 +40
Partials 262 262
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Merge activity
|
new exports from `@affine/component`: ```ts import { ConfirmModalProvider, useConfirmModal } from "@affine/component" ``` Open confirm modal with hook: ```ts const Component = () => { const { openConfirmModal } = useConformModal(); const open = () => { openConfirmModal({ // props of ConfirmModal /** * will show loading state when confirm clicked, and close after onConfirm finished */ onConfirm: async () => { await new Promise((r) => setTimeout(r, 2000)); }, }); } return <Button onClick={open}>Open</Button> } ```
a03b750
to
d412635
Compare
new exports from
@affine/component
:Open confirm modal with hook: