Skip to content

Commit

Permalink
feat(module:skeleton): support for square shape of skeleton button (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
HyperLife1119 committed Apr 19, 2024
1 parent 1588199 commit af1483a
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions components/skeleton/demo/element.ts
Expand Up @@ -59,6 +59,7 @@ import {
Button Shape:
<nz-radio-group [(ngModel)]="buttonShape">
<label nz-radio-button nzValue="default">Default</label>
<label nz-radio-button nzValue="square">Square</label>
<label nz-radio-button nzValue="circle">Circle</label>
<label nz-radio-button nzValue="round">Round</label>
</nz-radio-group>
Expand Down
2 changes: 1 addition & 1 deletion components/skeleton/doc/index.en-US.md
Expand Up @@ -58,7 +58,7 @@ import { NzSkeletonModule } from 'ng-zorro-antd/skeleton';
| ------------ | --------------------- | ---------------------------------- | ----------- |
| `[nzActive]` | Show animation effect | `boolean` | `false` |
| `[nzSize]` | Set the size | `'large' \| 'small' \| 'default'` | `'default'` |
| `[nzShape]` | Set the shape | `'circle' \| 'round' \| 'default'` | `'default'` |
| `[nzShape]` | Set the shape | `'square' \| 'circle' \| 'round' \| 'default'` | `'default'` |

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

Expand Down
2 changes: 1 addition & 1 deletion components/skeleton/doc/index.zh-CN.md
Expand Up @@ -59,7 +59,7 @@ import { NzSkeletonModule } from 'ng-zorro-antd/skeleton';
| ------------ | ---------------- | ---------------------------------- | ----------- |
| `[nzActive]` | 是否展示动画效果 | `boolean` | `false` |
| `[nzSize]` | 大小 | `'large' \| 'small' \| 'default'` | `'default'` |
| `[nzShape]` | 形状 | `'circle' \| 'round' \| 'default'` | `'default'` |
| `[nzShape]` | 形状 | `'square' \| 'circle' \| 'round' \| 'default'` | `'default'` |

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

Expand Down
1 change: 1 addition & 0 deletions components/skeleton/skeleton-element.component.ts
Expand Up @@ -39,6 +39,7 @@ export class NzSkeletonElementDirective {
template: `
<span
class="ant-skeleton-button"
[class.ant-skeleton-button-square]="nzShape === 'square'"
[class.ant-skeleton-button-round]="nzShape === 'round'"
[class.ant-skeleton-button-circle]="nzShape === 'circle'"
[class.ant-skeleton-button-lg]="nzSize === 'large'"
Expand Down
2 changes: 1 addition & 1 deletion components/skeleton/skeleton.type.ts
Expand Up @@ -4,7 +4,7 @@
*/

export type NzSkeletonParagraphWidth = number | string | Array<number | string>;
export type NzSkeletonButtonShape = 'circle' | 'round' | 'default';
export type NzSkeletonButtonShape = 'square' | 'circle' | 'round' | 'default';
export type NzSkeletonAvatarShape = 'square' | 'circle';
export type NzSkeletonInputSize = 'large' | 'small' | 'default';
export type NzSkeletonButtonSize = NzSkeletonInputSize;
Expand Down

0 comments on commit af1483a

Please sign in to comment.