Skip to content

Add closeTypes('manual', 'auto') for onClose to distinguish between manual-close by click and auto-close by duration timer. #168

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

FrankKai
Copy link

Add closeTypes('manual', 'auto') for onClose to distinguish between manual-close by click and auto-close by duration timer.

为onClose时间增加关闭类型:“手动关闭”和“自动关闭”,用于区分通过duration timer的关闭和通过用户click的关闭。

notification.open({
      ...
      onClose: (closeType) => {
          console.log(closeType) // "auto", "manual"
      },
})

@vercel
Copy link

vercel bot commented Apr 19, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/react-component/notification/FQXLYQaf6rpN9AW9yYaFkAHE63qU
✅ Preview: https://notification-git-fork-frankkai-master-react-component.vercel.app

@codecov
Copy link

codecov bot commented Apr 19, 2021

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.78%. Comparing base (af67623) to head (4d919b9).
⚠️ Report is 92 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #168      +/-   ##
==========================================
+ Coverage   98.75%   98.78%   +0.03%     
==========================================
  Files           3        3              
  Lines         160      165       +5     
  Branches       31       31              
==========================================
+ Hits          158      163       +5     
  Misses          2        2              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

1 participant