Skip to content

Commit

Permalink
fix(header): State was sometimes multi-line
Browse files Browse the repository at this point in the history
  • Loading branch information
RomRider committed Jan 30, 2021
1 parent 5223401 commit 4187104
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,17 +65,20 @@ export const styles: CSSResult = css`
#state__value {
display: table;
white-space: nowrap;
}
#state__value > #state {
font-size: 1.8em;
font-weight: 500;
white-space: nowrap;
}
#state__value > #uom {
font-size: 1em;
font-weight: 400;
opacity: 0.8;
white-space: nowrap;
}
#state__name {
Expand Down
2 changes: 1 addition & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,5 +140,5 @@ export function offsetData(data: EntityCachePoints, offset: number | undefined):

export function prettyPrintTime(value: string | number | null, unit: ChartCardPrettyTime): string {
if (value === null) return NO_VALUE;
return moment.duration(value, unit).format('y [y] d[d] h[h] m[m] s[s] S[ms]', { trim: 'both' });
return moment.duration(value, unit).format('y[y] d[d] h[h] m[m] s[s] S[ms]', { trim: 'both' });
}

0 comments on commit 4187104

Please sign in to comment.