Skip to content

Commit

Permalink
refactor(module:tooltip): migrate to new control flow (#8683)
Browse files Browse the repository at this point in the history
  • Loading branch information
HyperLife1119 authored Aug 6, 2024
1 parent 2e59d91 commit 03c3667
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions components/tooltip/demo/color.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,17 @@ import { presetColors } from 'ng-zorro-antd/core/color';
selector: 'nz-demo-tooltip-color',
template: `
<nz-divider nzText="Preset" nzOrientation="left"></nz-divider>
<button *ngFor="let color of presetColors" nz-button nz-tooltip [nzTooltipTitle]="color" [nzTooltipColor]="color">
{{ color }}
</button>
@for (color of presetColors; track color) {
<button nz-button nz-tooltip [nzTooltipTitle]="color" [nzTooltipColor]="color">
{{ color }}
</button>
}
<nz-divider nzText="Custom" nzOrientation="left"></nz-divider>
<button *ngFor="let color of customColors" nz-button nz-tooltip [nzTooltipTitle]="color" [nzTooltipColor]="color">
{{ color }}
</button>
@for (color of customColors; track color) {
<button nz-button nz-tooltip [nzTooltipTitle]="color" [nzTooltipColor]="color">
{{ color }}
</button>
}
`,
styles: [
`
Expand Down

0 comments on commit 03c3667

Please sign in to comment.