Skip to content

Commit e8dba29

Browse files
committed
chore: update chip styling
1 parent 71d96ac commit e8dba29

File tree

3 files changed

+37
-16
lines changed

3 files changed

+37
-16
lines changed

examples-standalone/kendoangular-landing-page/src/app/components/grid/dynamic-grid.component.css

+32
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,38 @@
2121
.green {
2222
color: #278200;
2323
}
24+
2425
.k-grid .k-table-row.k-table-alt-row {
2526
background-color: transparent;
2627
}
28+
29+
.status-chip-filled,
30+
.status-chip-filled:hover {
31+
background-color: rgb(0, 88, 233);
32+
border-color: var(--kendo-color-info-emphasis, #4082ef);
33+
color: rgb(255, 255, 255);
34+
}
35+
36+
.status-chip-open,
37+
.status-chip-open:hover {
38+
background-color: rgb(40, 133, 0);
39+
border-color: var(--kendo-color-success-emphasis, #37b400);
40+
color: rgb(255, 255, 255);
41+
}
42+
43+
.status-chip-rejected,
44+
.status-chip-rejected:hover {
45+
background-color: rgb(235, 23, 0);
46+
border-color: var(--kendo-color-error-emphasis, #d51923);
47+
color: rgb(255, 255, 255);
48+
}
49+
.k-chip {
50+
width: 45px;
51+
height: 10px;
52+
}
53+
.k-chip-content {
54+
justify-content: center;
55+
font-weight: 400;
56+
font-size: 10px;
57+
font-family: 'Roboto', sans-serif;
58+
}

examples-standalone/kendoangular-landing-page/src/app/components/grid/dynamic-grid.component.html

+5-3
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,11 @@
115115
<strong>{{ column.title }}</strong>
116116
</ng-template>
117117
<ng-template kendoGridCellTemplate let-dataItem="dataItem">
118-
<kendo-chip rounded="full" [themeColor]="getThemeColor(dataItem.status)">{{
119-
dataItem.status
120-
}}</kendo-chip>
118+
<kendo-chip
119+
rounded="full"
120+
[class]="'status-chip-' + dataItem.status.toLowerCase()">
121+
{{ dataItem.status }}
122+
</kendo-chip>
121123
</ng-template>
122124
</kendo-grid-column>
123125
</kendo-grid>

examples-standalone/kendoangular-landing-page/src/app/components/grid/dynamic-grid.component.ts

-13
Original file line numberDiff line numberDiff line change
@@ -107,19 +107,6 @@ export class DynamicGridComponent implements OnInit, OnDestroy {
107107
this.dataService.updateRefreshInterval(event);
108108
}
109109

110-
public getThemeColor(status: string): ChipThemeColor {
111-
switch (status) {
112-
case 'Filled':
113-
return 'info';
114-
case 'Open':
115-
return 'success';
116-
case 'Rejected':
117-
return 'error';
118-
default:
119-
return 'base';
120-
}
121-
}
122-
123110
public getAssetTypeIcon(assetType: string): SafeHtml {
124111
if (assetType === 'Real Estate') {
125112
return this.domSanitizer.bypassSecurityTrustHtml(realEstateIcon);

0 commit comments

Comments
 (0)