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

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

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

Merging #168 (4d919b9) into master (af67623) will increase coverage by 0.03%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            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              
Impacted Files Coverage Δ
src/Notice.tsx 98.03% <100.00%> (+0.21%) ⬆️
src/Notification.tsx 98.94% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update af67623...4d919b9. Read the comment docs.

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