Skip to content

Commit

Permalink
fix(module:*): replace icon type with new API
Browse files Browse the repository at this point in the history
  • Loading branch information
Wendell committed Jun 19, 2019
1 parent 42bf776 commit 577db69
Show file tree
Hide file tree
Showing 101 changed files with 200 additions and 194 deletions.
4 changes: 2 additions & 2 deletions components/alert/nz-alert.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@
class="ant-alert-close-icon"
(click)="closeAlert()">
<ng-template #closeDefaultTemplate>
<i nz-icon type="close" class="anticon-close"></i>
<i nz-icon nzType="close" class="anticon-close"></i>
</ng-template>
<ng-container *ngIf="nzCloseText; else closeDefaultTemplate">
<ng-container *nzStringTemplateOutlet="nzCloseText">{{ nzCloseText }}</ng-container>
</ng-container>
</a>
</div>
</div>
2 changes: 1 addition & 1 deletion components/badge/demo/basic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { Component } from '@angular/core';
<a class="head-example"></a>
</nz-badge>
<ng-template #iconTemplate>
<i nz-icon type="clock-circle" class="ant-scroll-number-custom-component" style="color: #f5222d"></i>
<i nz-icon nzType="clock-circle" class="ant-scroll-number-custom-component" style="color: #f5222d"></i>
</ng-template>
`,
styles: [
Expand Down
4 changes: 2 additions & 2 deletions components/badge/demo/change.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import { Component } from '@angular/core';
<a class="head-example"></a>
</nz-badge>
<nz-button-group>
<button nz-button (click)="minCount()"><i nz-icon type="minus"></i></button>
<button nz-button (click)="addCount()"><i nz-icon type="plus"></i></button>
<button nz-button (click)="minCount()"><i nz-icon nzType="minus"></i></button>
<button nz-button (click)="addCount()"><i nz-icon nzType="plus"></i></button>
</nz-button-group>
</div>
Expand Down
4 changes: 2 additions & 2 deletions components/badge/demo/dot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { Component } from '@angular/core';
@Component({
selector: 'nz-demo-badge-dot',
template: `
<nz-badge nzDot><i nz-icon type="notification"></i></nz-badge>
<nz-badge nzDot [nzShowDot]="false"><i nz-icon type="notification"></i></nz-badge>
<nz-badge nzDot><i nz-icon nzType="notification"></i></nz-badge>
<nz-badge nzDot [nzShowDot]="false"><i nz-icon nzType="notification"></i></nz-badge>
<nz-badge nzDot>
<a>Link something</a>
</nz-badge>
Expand Down
2 changes: 1 addition & 1 deletion components/breadcrumb/demo/separator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { Component } from '@angular/core';
An Application
</nz-breadcrumb-item>
</nz-breadcrumb>
<ng-template #iconTemplate><i nz-icon type="arrow-right"></i></ng-template>
<ng-template #iconTemplate><i nz-icon nzType="arrow-right"></i></ng-template>
`,
styles: [
`
Expand Down
4 changes: 2 additions & 2 deletions components/breadcrumb/demo/withIcon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import { Component } from '@angular/core';
template: `
<nz-breadcrumb>
<nz-breadcrumb-item>
<i nz-icon type="home"></i>
<i nz-icon nzType="home"></i>
</nz-breadcrumb-item>
<nz-breadcrumb-item>
<a><i nz-icon type="user"></i><span>Application List</span></a>
<a><i nz-icon nzType="user"></i><span>Application List</span></a>
</nz-breadcrumb-item>
<nz-breadcrumb-item>
Application
Expand Down
8 changes: 4 additions & 4 deletions components/button/demo/button-group.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ import { Component } from '@angular/core';
</nz-button-group>
<h4>With Icon</h4>
<nz-button-group>
<button nz-button nzType="primary"><i nz-icon type="left"></i> Go back</button>
<button nz-button nzType="primary">Go forward<i nz-icon type="right"></i></button>
<button nz-button nzType="primary"><i nz-icon nzType="left"></i> Go back</button>
<button nz-button nzType="primary">Go forward<i nz-icon nzType="right"></i></button>
</nz-button-group>
<nz-button-group>
<button nz-button nzType="primary"><i nz-icon type="cloud"></i></button>
<button nz-button nzType="primary"><i nz-icon type="cloud-download"></i></button>
<button nz-button nzType="primary"><i nz-icon nzType="cloud"></i></button>
<button nz-button nzType="primary"><i nz-icon nzType="cloud-download"></i></button>
</nz-button-group>
`,
styles: [
Expand Down
4 changes: 2 additions & 2 deletions components/button/demo/loading.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ import { Component } from '@angular/core';
@Component({
selector: 'nz-demo-button-loading',
template: `
<button nz-button nzType="primary" nzLoading><i nz-icon type="poweroff"></i>Loading</button>
<button nz-button nzType="primary" nzLoading><i nz-icon nzType="poweroff"></i>Loading</button>
<button nz-button nzType="primary" nzSize="small" nzLoading>Loading</button>
<br />
<button nz-button nzType="primary" (click)="loadOne()" [nzLoading]="isLoadingOne">Click me!</button>
<button nz-button nzType="primary" (click)="loadTwo()" [nzLoading]="isLoadingTwo">
<i nz-icon type="poweroff"></i>Click me!
<i nz-icon nzType="poweroff"></i>Click me!
</button>
<br />
<button nz-button nzLoading nzShape="circle"></button>
Expand Down
12 changes: 7 additions & 5 deletions components/button/demo/size.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,15 @@ import { Component } from '@angular/core';
<button nz-button [nzSize]="size" nzType="danger">Danger</button>
<button nz-button [nzSize]="size" nzType="link">Link</button>
<br />
<button nz-button nzType="primary" [nzSize]="size" nzShape="circle"><i nz-icon type="download"></i></button>
<button nz-button nzType="primary" [nzSize]="size" nzShape="round"><i nz-icon type="download"></i>Download</button>
<button nz-button nzType="primary" [nzSize]="size"><i nz-icon type="download"></i>Download</button>
<button nz-button nzType="primary" [nzSize]="size" nzShape="circle"><i nz-icon nzType="download"></i></button>
<button nz-button nzType="primary" [nzSize]="size" nzShape="round">
<i nz-icon nzType="download"></i>Download
</button>
<button nz-button nzType="primary" [nzSize]="size"><i nz-icon nzType="download"></i>Download</button>
<br />
<nz-button-group [nzSize]="size">
<button nz-button nzType="primary"><i nz-icon type="left"></i>Backward</button>
<button nz-button nzType="primary">Forward<i nz-icon type="right"></i></button>
<button nz-button nzType="primary"><i nz-icon nzType="left"></i>Backward</button>
<button nz-button nzType="primary">Forward<i nz-icon nzType="right"></i></button>
</nz-button-group>
`,
styles: [
Expand Down
4 changes: 2 additions & 2 deletions components/button/nz-button.component.html
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<i nz-icon type="loading" *ngIf="nzLoading"></i>
<span #contentElement><ng-content></ng-content></span>
<i nz-icon nzType="loading" *ngIf="nzLoading"></i>
<span #contentElement><ng-content></ng-content></span>
4 changes: 2 additions & 2 deletions components/button/nz-button.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ export class NzTestButtonSearchComponent {}
@Component({
template: `
<button nz-button nzType="primary" (click)="load()" [nzLoading]="loading">
<i nz-icon type="poweroff"></i> {{ 'Click me!' }}
<i nz-icon nzType="poweroff"></i> {{ 'Click me!' }}
</button>
`
})
Expand All @@ -400,7 +400,7 @@ export class NzTestButtonBindingComponent {
template: `
<button nz-button>
{{ title }}
<i nz-icon type="caret-down"></i>
<i nz-icon nzType="caret-down"></i>
</button>
`
})
Expand Down
2 changes: 1 addition & 1 deletion components/card/demo/loading.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import { Component } from '@angular/core';
<i nz-icon nzType="edit"></i>
</ng-template>
<ng-template #actionEllipsis>
<i nz-icon type="ellipsis"></i>
<i nz-icon nzType="ellipsis"></i>
</ng-template>
`
})
Expand Down
2 changes: 1 addition & 1 deletion components/card/demo/meta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { Component } from '@angular/core';
<i nz-icon nzType="edit"></i>
</ng-template>
<ng-template #actionEllipsis>
<i nz-icon type="ellipsis"></i>
<i nz-icon nzType="ellipsis"></i>
</ng-template>
`
})
Expand Down
4 changes: 2 additions & 2 deletions components/cascader/nz-cascader.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
(change)="$event.stopPropagation()">
<i *ngIf="clearIconVisible"
nz-icon
type="close-circle"
nzType="close-circle"
theme="fill"
class="ant-cascader-picker-clear"
(click)="clearSelection($event)"></i>
Expand All @@ -32,7 +32,7 @@
class="ant-cascader-picker-arrow"
[class.ant-cascader-picker-arrow-expand]="menuVisible">
</i>
<i *ngIf="isLoading" nz-icon type="loading" class="ant-cascader-picker-arrow"></i>
<i *ngIf="isLoading" nz-icon nzType="loading" class="ant-cascader-picker-arrow"></i>
<span
class="ant-cascader-picker-label"
[class.ant-cascader-show-search]="!!nzShowSearch"
Expand Down
2 changes: 1 addition & 1 deletion components/collapse/demo/custom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { Component } from '@angular/core';
<p>{{ panel.name }} content</p>
<ng-template #expandedIcon let-active>
{{ active }}
<i nz-icon type="caret-right" class="ant-collapse-arrow" [nzRotate]="p.nzActive ? 90 : -90"></i>
<i nz-icon nzType="caret-right" class="ant-collapse-arrow" [nzRotate]="p.nzActive ? 90 : -90"></i>
</ng-template>
</nz-collapse-panel>
</nz-collapse>
Expand Down
2 changes: 1 addition & 1 deletion components/collapse/nz-collapse.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ export class NzTestCollapseTemplateComponent {}
<p>Panel01</p>
</nz-collapse-panel>
<ng-template #expandedIcon>
<i nz-icon type="caret-right" class="ant-collapse-arrow"></i>
<i nz-icon nzType="caret-right" class="ant-collapse-arrow"></i>
</ng-template>
</nz-collapse>
`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
/>
</div>
<a class="{{ prefixCls }}-clear-btn" role="button" title="{{ locale.clear }}">
<!--<i nz-icon type="close"></i>-->
<!--<i nz-icon nzType="close"></i>-->
</a>
</div>
</div>
4 changes: 2 additions & 2 deletions components/date-picker/picker.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
(click)="onClickClear($event)"
></i>
<span class="{{ prefixCls }}-picker-icon">
<i nz-icon type="calendar"></i>
<i nz-icon nzType="calendar"></i>
</span>
</ng-template>

Expand All @@ -89,4 +89,4 @@
> <!-- Compatible for overlay that not support offset dynamically and immediately -->
<ng-content></ng-content>
</div>
</ng-template>
</ng-template>
2 changes: 1 addition & 1 deletion components/divider/demo/horizontal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { Component } from '@angular/core';
sunt a te dicta? Refert tamen, quo modo.
</p>
<nz-divider nzDashed [nzText]="text">
<ng-template #text><i nz-icon type="plus"></i> Add</ng-template>
<ng-template #text><i nz-icon nzType="plus"></i> Add</ng-template>
</nz-divider>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed nonne merninisti licere mihi ista probare, quae
Expand Down
2 changes: 1 addition & 1 deletion components/divider/divider.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class TestDividerComponent {
@Component({
template: `
<nz-divider nzDashed [nzText]="text">
<ng-template #text><i nz-icon type="plus"></i> Add</ng-template>
<ng-template #text><i nz-icon nzType="plus"></i> Add</ng-template>
</nz-divider>
`
})
Expand Down
4 changes: 2 additions & 2 deletions components/drawer/nz-drawer.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
</div>
</div>
<button *ngIf="nzClosable" (click)="closeClick()" aria-label="Close" class="ant-drawer-close">
<span class="ant-drawer-close-x"><i nz-icon type="close"></i></span>
<span class="ant-drawer-close-x"><i nz-icon nzType="close"></i></span>
</button>
<div class="ant-drawer-body" [ngStyle]="nzBodyStyle">
<ng-template cdkPortalOutlet></ng-template>
Expand All @@ -37,4 +37,4 @@
</div>
</div>
</div>
</ng-template>
</ng-template>
2 changes: 1 addition & 1 deletion components/empty/demo/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import { NzConfigService } from 'ng-zorro-antd';
<ng-template #customTpl let-name>
<div style="text-align: center;">
<i nz-icon type="smile" style="font-size: 20px;"></i>
<i nz-icon nzType="smile" style="font-size: 20px;"></i>
<p>Data Not Found in {{ name }}</p>
</div>
</ng-template>
Expand Down
4 changes: 2 additions & 2 deletions components/form/demo/dynamic-form-item.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { AbstractControl, FormBuilder, FormControl, FormGroup, Validators } from
[attr.id]="control.id"
[formControlName]="control.controlInstance"
/>
<i nz-icon type="minus-circle-o" class="dynamic-delete-button" (click)="removeField(control, $event)"></i>
<i nz-icon nzType="minus-circle-o" class="dynamic-delete-button" (click)="removeField(control, $event)"></i>
<nz-form-explain
*ngIf="
getFormControl(control.controlInstance)?.dirty &&
Expand All @@ -31,7 +31,7 @@ import { AbstractControl, FormBuilder, FormControl, FormGroup, Validators } from
<nz-form-item>
<nz-form-control [nzXs]="{ span: 24, offset: 0 }" [nzSm]="{ span: 20, offset: 4 }">
<button nz-button nzType="dashed" style="width:60%" (click)="addField($event)">
<i nz-icon type="plus"></i> Add field
<i nz-icon nzType="plus"></i> Add field
</button>
</nz-form-control>
</nz-form-item>
Expand Down
4 changes: 2 additions & 2 deletions components/form/demo/horizontal-login.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ import { FormBuilder, FormGroup, Validators } from '@angular/forms';
</nz-form-control>
</nz-form-item>
</form>
<ng-template #prefixUser><i nz-icon type="user"></i></ng-template>
<ng-template #prefixLock><i nz-icon type="lock"></i></ng-template>
<ng-template #prefixUser><i nz-icon nzType="user"></i></ng-template>
<ng-template #prefixLock><i nz-icon nzType="lock"></i></ng-template>
`
})
export class NzDemoFormHorizontalLoginComponent implements OnInit {
Expand Down
4 changes: 2 additions & 2 deletions components/form/demo/normal-login.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ import { FormBuilder, FormGroup, Validators } from '@angular/forms';
</nz-form-control>
</nz-form-item>
</form>
<ng-template #prefixUser><i nz-icon type="user"></i></ng-template>
<ng-template #prefixLock><i nz-icon type="lock"></i></ng-template>
<ng-template #prefixUser><i nz-icon nzType="user"></i></ng-template>
<ng-template #prefixLock><i nz-icon nzType="lock"></i></ng-template>
`,
styles: [
`
Expand Down
4 changes: 2 additions & 2 deletions components/input-number/nz-input-number.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
(mouseup)="stop()"
(mouseleave)="stop()"
[class.ant-input-number-handler-up-disabled]="disabledUp">
<i nz-icon type="up" class="ant-input-number-handler-up-inner"></i>
<i nz-icon nzType="up" class="ant-input-number-handler-up-inner"></i>
</span>
<span unselectable="unselectable"
class="ant-input-number-handler ant-input-number-handler-down"
Expand All @@ -29,4 +29,4 @@
(keyup)="onKeyUp()"
[ngModel]="displayValue"
(ngModelChange)="onModelChange($event)">
</div>
</div>
2 changes: 1 addition & 1 deletion components/input/demo/presuffix.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Component } from '@angular/core';
<nz-input-group [nzSuffix]="suffixTemplate" [nzPrefix]="prefixTemplate">
<input type="text" nz-input placeholder="Enter your username" />
</nz-input-group>
<ng-template #prefixTemplate><i nz-icon type="user"></i></ng-template>
<ng-template #prefixTemplate><i nz-icon nzType="user"></i></ng-template>
<ng-template #suffixTemplate><i nz-icon nz-tooltip nzTitle="Extra information" type="info-circle"></i></ng-template>
`
})
Expand Down
8 changes: 4 additions & 4 deletions components/layout/demo/custom-trigger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,22 @@ import { Component, TemplateRef, ViewChild } from '@angular/core';
<div class="logo"></div>
<ul nz-menu [nzTheme]="'dark'" [nzMode]="'inline'" [nzInlineCollapsed]="isCollapsed">
<li nz-submenu>
<span title><i nz-icon type="user"></i><span class="nav-text">User</span></span>
<span title><i nz-icon nzType="user"></i><span class="nav-text">User</span></span>
<ul>
<li nz-menu-item>Tom</li>
<li nz-menu-item>Bill</li>
<li nz-menu-item>Alex</li>
</ul>
</li>
<li nz-submenu>
<span title><i nz-icon type="team"></i><span class="nav-text">Team</span></span>
<span title><i nz-icon nzType="team"></i><span class="nav-text">Team</span></span>
<ul>
<li nz-menu-item>Team 1</li>
<li nz-menu-item>Team 2</li>
</ul>
</li>
<li nz-menu-item>
<span><i nz-icon type="file"></i><span class="nav-text">File</span></span>
<span><i nz-icon nzType="file"></i><span class="nav-text">File</span></span>
</li>
</ul>
</nz-sider>
Expand All @@ -49,7 +49,7 @@ import { Component, TemplateRef, ViewChild } from '@angular/core';
</nz-layout>
</nz-layout>
<ng-template #trigger>
<i nz-icon type="up"></i>
<i nz-icon nzType="up"></i>
</ng-template>
`,
styles: [
Expand Down
Loading

0 comments on commit 577db69

Please sign in to comment.