Skip to content

Commit 6d03099

Browse files
authored
fix(module:color-picker): optimize demo copywriting and style (#8088)
1 parent 42da190 commit 6d03099

File tree

4 files changed

+28
-12
lines changed

4 files changed

+28
-12
lines changed

components/color-picker/demo/disable.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ title:
77

88
## zh-CN
99

10-
最简单的用法
10+
设置为禁用状态
1111

1212
## en-US
1313

components/color-picker/demo/flip-flop.ts

+8-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,14 @@ import { Component } from '@angular/core';
77
<ng-template #flipFlop>
88
<button nz-button nzType="primary" [style.background-color]="color">Color</button>
99
</ng-template>
10-
`
10+
`,
11+
styles: [
12+
`
13+
button {
14+
border: none;
15+
}
16+
`
17+
]
1118
})
1219
export class NzDemoColorPickerFlipFlopComponent {
1320
color = '#1677ff';

components/color-picker/demo/format.ts

+17-8
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,23 @@ import { Component } from '@angular/core';
33
@Component({
44
selector: 'nz-demo-color-picker-format',
55
template: `
6-
<nz-color-picker nzFormat="hex" [(ngModel)]="hex"></nz-color-picker> HEX: {{ hex }}
7-
<br />
8-
<br />
9-
<nz-color-picker nzFormat="hsb" [(ngModel)]="hsb"></nz-color-picker> HSB: {{ hsb }}
10-
<br />
11-
<br />
12-
<nz-color-picker nzFormat="rgb" [(ngModel)]="rgb"></nz-color-picker> RGB: {{ rgb }}
13-
`
6+
<div class="format"> <nz-color-picker nzFormat="hex" [(ngModel)]="hex"></nz-color-picker> HEX: {{ hex }} </div>
7+
<div class="format"> <nz-color-picker nzFormat="hsb" [(ngModel)]="hsb"></nz-color-picker> HSB: {{ hsb }} </div>
8+
<div class="format"> <nz-color-picker nzFormat="rgb" [(ngModel)]="rgb"></nz-color-picker> RGB: {{ rgb }} </div>
9+
`,
10+
styles: [
11+
`
12+
.format {
13+
display: flex;
14+
align-items: center;
15+
margin-bottom: 12px;
16+
}
17+
18+
nz-color-picker {
19+
margin-right: 8px;
20+
}
21+
`
22+
]
1423
})
1524
export class NzDemoColorPickerFormatComponent {
1625
hex: string = '#1677ff';

components/color-picker/demo/show-text.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ title:
77

88
## zh-CN
99

10-
最简单的用法
10+
渲染触发器的默认文本, `nzShowText``true` 时生效
1111

1212
## en-US
1313

14-
Show color text.
14+
The default text of the rendering trigger, effective when `nzShowText` is `true`.

0 commit comments

Comments
 (0)