|
1 | 1 | @if (!isRight) { |
2 | | - <ng-container [ngTemplateOutlet]="labelTemplate" /> |
| 2 | + <ng-container [ngTemplateOutlet]="labelTemplate" /> |
3 | 3 | } |
4 | 4 | @if (buttonPosition === 'left') { |
5 | | - <ng-container [ngTemplateOutlet]="contentTemplate" /> |
| 5 | + <ng-container [ngTemplateOutlet]="contentTemplate" /> |
6 | 6 | } |
7 | 7 | <ng-content /> |
8 | 8 | @if (type === 'color') { |
9 | | - <input type="text" [(ngModel)]="value" [attr.readOnly]="readonly || undefined" [attr.disabled]="disabled || undefined" (ngModelChange)="onChange()"> |
10 | | - <label class="ui label" [style.background-color]="value" [for]="for"> |
11 | | - <input type="color" [(ngModel)]="value" [attr.name]="name" [attr.readOnly]="readonly || undefined" [attr.disabled]="disabled || undefined" (ngModelChange)="onChange()"> |
12 | | - </label> |
| 9 | + <input type="text" [(ngModel)]="value" [attr.readOnly]="readonly || undefined" [attr.disabled]="disabled || undefined" (ngModelChange)="onChange()"> |
| 10 | + <label class="ui label color-label" [style.background-color]="value" [for]="colorForId"> |
| 11 | + <input type="color" [id]="colorForId" [(ngModel)]="value" [attr.name]="name" [attr.readOnly]="readonly || undefined" [attr.disabled]="disabled || undefined" (ngModelChange)="onChange()" #colorInput> |
| 12 | + </label> |
13 | 13 | } |
14 | 14 | <input *m-fallback-for="'input'" [type]="type || 'text'" [placeholder]="placeholder || ''" [(ngModel)]="value" [attr.name]="name" [attr.maxlength]="maxlength" [attr.readOnly]="readonly || undefined" [attr.disabled]="disabled || undefined" (ngModelChange)="onChange()" #input> |
15 | 15 | @if (icon) { |
16 | | - <m-icon [icon]="icon" [size]="iconSize" class="link icon" /> |
| 16 | + <m-icon [icon]="icon" [size]="iconSize" class="link icon" /> |
17 | 17 | } |
18 | 18 | @if (isRight) { |
19 | | - <ng-container [ngTemplateOutlet]="labelTemplate" /> |
| 19 | + <ng-container [ngTemplateOutlet]="labelTemplate" /> |
20 | 20 | } |
21 | 21 | @if (buttonPosition === 'right') { |
22 | | - <ng-container [ngTemplateOutlet]="contentTemplate" /> |
| 22 | + <ng-container [ngTemplateOutlet]="contentTemplate" /> |
23 | 23 | } |
24 | 24 |
|
25 | 25 | <ng-template #labelTemplate> |
26 | | - <ng-content select="m-label" /> |
27 | | - <ng-content select="m-label-dropdown" /> |
| 26 | + <ng-content select="m-label" /> |
| 27 | + <ng-content select="m-label-dropdown" /> |
28 | 28 | </ng-template> |
29 | 29 |
|
30 | 30 | <ng-template #contentTemplate> |
31 | | - <ng-content select="m-button" /> |
32 | | - <ng-content select="m-icon-button" /> |
| 31 | + <ng-content select="m-button" /> |
| 32 | + <ng-content select="m-icon-button" /> |
33 | 33 | </ng-template> |
0 commit comments