Skip to content

Commit

Permalink
fix(module:tabs): fix icons position (#2303)
Browse files Browse the repository at this point in the history
  • Loading branch information
hsuanxyz authored Oct 19, 2018
1 parent 717648b commit c098b42
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion components/icon/nz-icon.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,10 @@ export class NzIconDirective extends IconDirective implements OnInit, OnChanges,
});
this._classNameObserver.observe(this._elementRef.nativeElement, { attributes: true });
}
this._renderer.addClass(this._elementRef.nativeElement, 'anticon');

if (!this._el.classList.contains('anticon')) {
this._renderer.setAttribute(this._el, 'class', `anticon ${this._el.className}`);
}
}

ngOnDestroy(): void {
Expand Down
4 changes: 2 additions & 2 deletions components/tabs/nz-tabs-nav.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
<div class="ant-tabs-nav-container" [class.ant-tabs-nav-container-scrolling]="showPaginationControls" #navContainerElement>
<span class="ant-tabs-tab-prev" (click)="scrollHeader('before')" [class.ant-tabs-tab-btn-disabled]="disableScrollBefore" [class.ant-tabs-tab-arrow-show]="showPaginationControls">
<span class="ant-tabs-tab-prev-icon">
<i nz-icon type="left" class="ant-tabs-tab-pre-icon-target"></i>
<i nz-icon [type]="nzPositionMode === 'horizontal' ? 'left' : 'up'" class="ant-tabs-tab-prev-icon-target"></i>
</span>
</span>
<span class="ant-tabs-tab-next" (click)="scrollHeader('after')" [class.ant-tabs-tab-btn-disabled]="disableScrollAfter" [class.ant-tabs-tab-arrow-show]="showPaginationControls">
<span class="ant-tabs-tab-next-icon">
<i nz-icon type="right" class="ant-tabs-tab-next-icon-target"></i>
<i nz-icon [type]="nzPositionMode === 'horizontal' ? 'right' : 'down'" class="ant-tabs-tab-next-icon-target"></i>
</span>
</span>
<div class="ant-tabs-nav-wrap">
Expand Down

0 comments on commit c098b42

Please sign in to comment.