Skip to content

Commit af1483a

Browse files
feat(module:skeleton): support for square shape of skeleton button (#8481)
1 parent 1588199 commit af1483a

File tree

5 files changed

+5
-3
lines changed

5 files changed

+5
-3
lines changed

components/skeleton/demo/element.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ import {
5959
Button Shape:
6060
<nz-radio-group [(ngModel)]="buttonShape">
6161
<label nz-radio-button nzValue="default">Default</label>
62+
<label nz-radio-button nzValue="square">Square</label>
6263
<label nz-radio-button nzValue="circle">Circle</label>
6364
<label nz-radio-button nzValue="round">Round</label>
6465
</nz-radio-group>

components/skeleton/doc/index.en-US.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ import { NzSkeletonModule } from 'ng-zorro-antd/skeleton';
5858
| ------------ | --------------------- | ---------------------------------- | ----------- |
5959
| `[nzActive]` | Show animation effect | `boolean` | `false` |
6060
| `[nzSize]` | Set the size | `'large' \| 'small' \| 'default'` | `'default'` |
61-
| `[nzShape]` | Set the shape | `'circle' \| 'round' \| 'default'` | `'default'` |
61+
| `[nzShape]` | Set the shape | `'square' \| 'circle' \| 'round' \| 'default'` | `'default'` |
6262

6363
### nz-skeleton-element [nzType="avatar"]:standalone
6464

components/skeleton/doc/index.zh-CN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ import { NzSkeletonModule } from 'ng-zorro-antd/skeleton';
5959
| ------------ | ---------------- | ---------------------------------- | ----------- |
6060
| `[nzActive]` | 是否展示动画效果 | `boolean` | `false` |
6161
| `[nzSize]` | 大小 | `'large' \| 'small' \| 'default'` | `'default'` |
62-
| `[nzShape]` | 形状 | `'circle' \| 'round' \| 'default'` | `'default'` |
62+
| `[nzShape]` | 形状 | `'square' \| 'circle' \| 'round' \| 'default'` | `'default'` |
6363

6464
### nz-skeleton-element [nzType="avatar"]:standalone
6565

components/skeleton/skeleton-element.component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ export class NzSkeletonElementDirective {
3939
template: `
4040
<span
4141
class="ant-skeleton-button"
42+
[class.ant-skeleton-button-square]="nzShape === 'square'"
4243
[class.ant-skeleton-button-round]="nzShape === 'round'"
4344
[class.ant-skeleton-button-circle]="nzShape === 'circle'"
4445
[class.ant-skeleton-button-lg]="nzSize === 'large'"

components/skeleton/skeleton.type.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*/
55

66
export type NzSkeletonParagraphWidth = number | string | Array<number | string>;
7-
export type NzSkeletonButtonShape = 'circle' | 'round' | 'default';
7+
export type NzSkeletonButtonShape = 'square' | 'circle' | 'round' | 'default';
88
export type NzSkeletonAvatarShape = 'square' | 'circle';
99
export type NzSkeletonInputSize = 'large' | 'small' | 'default';
1010
export type NzSkeletonButtonSize = NzSkeletonInputSize;

0 commit comments

Comments
 (0)