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

feat(module:notification): add close icon prop #4495

Merged
merged 2 commits into from Dec 9, 2019

Conversation

wzhudev
Copy link
Member

@wzhudev wzhudev commented Dec 2, 2019

close #4494

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Application (the showcase website) / infrastructure changes
[ ] Other... Please describe:

What is the current behavior?

Issue Number: #4494

What is the new behavior?

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

@zorro-bot
Copy link

zorro-bot bot commented Dec 2, 2019

This preview will be available after the checks is complete.

<i nz-icon nzType="close" class="ant-notification-close-icon"></i>
<ng-container *ngIf="nzMessage.options?.nzCloseIcon">
<ng-container *nzStringTemplateOutlet="nzMessage.options?.nzCloseIcon">
<i nz-icon [nzType]="nzMessage.options?.nzCloseIcon"></i>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

上面安全取值了,下面的 ?. 操作符是不是可以不要了

Copy link
Member Author

@wzhudev wzhudev Dec 2, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不行,试过了,没那么智能……

@netlify
Copy link

netlify bot commented Dec 2, 2019

Deploy preview for ng-zorro-master ready!

Built with commit a7a8886

https://deploy-preview-4495--ng-zorro-master.netlify.com

@codecov
Copy link

codecov bot commented Dec 2, 2019

Codecov Report

Merging #4495 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #4495   +/-   ##
=======================================
  Coverage   92.01%   92.01%           
=======================================
  Files         519      519           
  Lines       10925    10925           
  Branches     1983     1983           
=======================================
  Hits        10053    10053           
  Misses        448      448           
  Partials      424      424
Impacted Files Coverage Δ
components/notification/nz-notification.module.ts 100% <ø> (ø) ⬆️

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 2397819...a7a8886. Read the comment docs.

<i nz-icon [nzType]="nzMessage.options?.nzCloseIcon"></i>
</ng-container>
</ng-container>
<ng-container *ngIf="!nzMessage.options?.nzCloseIcon">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

用 else?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

也行……

Copy link
Member

@vthinkxie vthinkxie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@vthinkxie vthinkxie merged commit 80a0b26 into NG-ZORRO:master Dec 9, 2019
@wzhudev wzhudev deleted the notification-close-icon branch December 9, 2019 11:28
Ricbet pushed a commit to Ricbet/ng-zorro-antd that referenced this pull request Apr 9, 2020
* feat(module:notification): add close icon prop
close NG-ZORRO#4494

* fix: use else instead
@hsuanxyz hsuanxyz mentioned this pull request Apr 15, 2020
hsuanxyz pushed a commit to hsuanxyz/ng-zorro-antd that referenced this pull request Aug 5, 2020
* feat(module:notification): add close icon prop
close NG-ZORRO#4494

* fix: use else instead
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add closeIcon API to Notification component
3 participants