Skip to content

Commit

Permalink
fix(module:tabs): tab-link cannot be disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
hsuanxyz committed Sep 10, 2020
1 parent 4cc14ba commit 9216a9f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
4 changes: 3 additions & 1 deletion components/button/button.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,9 @@ export class TestButtonIconOnlyComponent {}
export class TestButtonIconOnlyLoadingComponent {}

@Component({
template: ` <a nz-button href="https://ng.ant.design/" [disabled]="disabled">anchor</a> `
template: `
<a nz-button href="https://ng.ant.design/" [disabled]="disabled">anchor</a>
`
})
export class TestAnchorButtonComponent {
disabled = false;
Expand Down
12 changes: 12 additions & 0 deletions components/tabs/style/patch.less
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,20 @@ nz-tabs-nav {
color: @disabled-color;
background: transparent;
cursor: not-allowed;

a {
pointer-events: none;
color: @disabled-color;
}
}
}
}
}
}

.@{tab-prefix-cls} {
&-tab-disabled a {
pointer-events: none;
color: @disabled-color;
}
}

0 comments on commit 9216a9f

Please sign in to comment.