Skip to content

Commit

Permalink
fix: deprecate old icon API
Browse files Browse the repository at this point in the history
  • Loading branch information
Wendell committed Jun 21, 2019
1 parent 8d765aa commit e1a9d34
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion components/alert/nz-alert.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<ng-container *ngIf="nzShowIcon">
<i class="ant-alert-icon" [ngClass]="nzIconType" *ngIf="nzIconType; else iconTemplate"></i>
<ng-template #iconTemplate>
<i nz-icon class="ant-alert-icon" [type]="iconType" [nzTheme]="iconTheme"></i>
<i nz-icon class="ant-alert-icon" [nzType]="iconType" [nzTheme]="iconTheme"></i>
</ng-template>
</ng-container>
<span class="ant-alert-message" *ngIf="nzMessage">
Expand Down
2 changes: 1 addition & 1 deletion components/form/nz-form-control.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<span class="ant-form-item-children">
<ng-content></ng-content>
<span class="ant-form-item-children-icon">
<i *ngIf="nzHasFeedback && iconType" nz-icon [type]="iconType"></i>
<i *ngIf="nzHasFeedback && iconType" nz-icon [nzType]="iconType"></i>
</span>
</span>
<div class="ant-form-explain" *ngIf="showSuccessTip || showWarningTip || showErrorTip || showValidatingTip">
Expand Down
2 changes: 1 addition & 1 deletion components/input/demo/password-input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Component } from '@angular/core';
template: `
<nz-input-group [nzSuffix]="suffixTemplate">
<input
[type]="passwordVisible ? 'text' : 'password'"
[nzType]="passwordVisible ? 'text' : 'password'"
nz-input
placeholder="input password"
[(ngModel)]="password"
Expand Down
2 changes: 1 addition & 1 deletion components/layout/nz-layout.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ describe('layout', () => {
<i
class="trigger"
nz-icon
[type]="isCollapsed ? 'menu-unfold' : 'menu-fold'"
[nzType]="isCollapsed ? 'menu-unfold' : 'menu-fold'"
(click)="isCollapsed = !isCollapsed"
></i>
</nz-header>
Expand Down
2 changes: 1 addition & 1 deletion components/page-header/nz-page-header.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<div *ngIf="nzBackIcon !== null" (click)="onBack()" class="ant-page-header-back">
<div role="button" tabindex="0" class="ant-page-header-back-button">
<i *ngIf="isStringBackIcon" nz-icon [type]="nzBackIcon ? nzBackIcon : 'arrow-left'" theme="outline"></i>
<i *ngIf="isStringBackIcon" nz-icon [nzType]="nzBackIcon ? nzBackIcon : 'arrow-left'" theme="outline"></i>
<ng-container *ngIf="isTemplateRefBackIcon" [ngTemplateOutlet]="nzBackIcon"></ng-container>
</div>
<nz-divider nzType="vertical"></nz-divider>
Expand Down
2 changes: 1 addition & 1 deletion components/tree/demo/customized-icon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { Component, OnInit } from '@angular/core';
<i
*ngIf="!node.origin.isLeaf"
nz-icon
[type]="node.isExpanded ? 'folder-open' : 'folder'"
[nzType]="node.isExpanded ? 'folder-open' : 'folder'"
class="ant-tree-switcher-line-icon"
></i>
<i *ngIf="node.origin.isLeaf" nz-icon nzType="file" class="ant-tree-switcher-line-icon"></i>
Expand Down
2 changes: 1 addition & 1 deletion components/tree/demo/directory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { NzContextMenuService, NzDropdownMenuComponent, NzFormatEmitEvent, NzTre
<ng-template #nzTreeTemplate let-node>
<span class="custom-node" [class.active]="activedNode?.key === node.key">
<span *ngIf="!node.isLeaf" (contextmenu)="contextMenu($event, menu)">
<i nz-icon [type]="node.isExpanded ? 'folder-open' : 'folder'" (click)="openFolder(node)"></i>
<i nz-icon [nzType]="node.isExpanded ? 'folder-open' : 'folder'" (click)="openFolder(node)"></i>
<span class="folder-name">{{ node.title }}</span>
<span class="folder-desc">created by {{ node?.origin?.author | lowercase }}</span>
</span>
Expand Down
2 changes: 1 addition & 1 deletion components/tree/nz-tree-node.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
[ngClass]="nzNodeContentLoadingClass">
<span
[ngClass]="nzNodeContentIconClass">
<i nz-icon *ngIf="nzIcon" [type]="nzIcon"></i>
<i nz-icon *ngIf="nzIcon" [nzType]="nzIcon"></i>
</span>
</span>
<span class="ant-tree-title">
Expand Down

0 comments on commit e1a9d34

Please sign in to comment.