-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(module:badge): support size (#7405)
- Loading branch information
Showing
13 changed files
with
156 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
order: 6 | ||
title: | ||
zh-CN: 自定义位置偏移 | ||
en-US: Offset | ||
--- | ||
|
||
## zh-CN | ||
|
||
设置状态点的位置偏移,格式为 `[left, top]`,表示状态点距默认位置左侧、上方的偏移量。 | ||
|
||
## en-US | ||
|
||
Set offset of the badge dot, the format is `[left, top]`, which represents the offset of the status dot from the left and top of the default position. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { Component } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'nz-demo-badge-offset', | ||
template: ` | ||
<a> | ||
<nz-badge [nzCount]="5" [nzOffset]="[10, 10]"> | ||
<a class="head-example"></a> | ||
</nz-badge> | ||
</a> | ||
`, | ||
styles: [ | ||
` | ||
.head-example { | ||
width: 42px; | ||
height: 42px; | ||
border-radius: 4px; | ||
background: #eee; | ||
display: inline-block; | ||
vertical-align: middle; | ||
} | ||
` | ||
] | ||
}) | ||
export class NzDemoBadgeOffsetComponent {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
order: 7 | ||
title: | ||
zh-CN: 大小 | ||
en-US: Size | ||
--- | ||
|
||
## zh-CN | ||
|
||
可以设置有数字徽标的大小。 | ||
|
||
## en-US | ||
|
||
Set size of numeral Badge. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { Component } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'nz-demo-badge-size', | ||
template: ` | ||
<nz-badge nzSize="default" [nzCount]="5"> | ||
<a class="head-example"></a> | ||
</nz-badge> | ||
<nz-badge nzSize="small" [nzCount]="5"> | ||
<a class="head-example"></a> | ||
</nz-badge> | ||
`, | ||
styles: [ | ||
` | ||
nz-badge { | ||
margin-right: 20px; | ||
} | ||
.head-example { | ||
width: 42px; | ||
height: 42px; | ||
border-radius: 4px; | ||
background: #eee; | ||
display: inline-block; | ||
vertical-align: middle; | ||
} | ||
` | ||
] | ||
}) | ||
export class NzDemoBadgeSizeComponent {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters