Skip to content

Commit 1f4e13f

Browse files
author
Marko Petzold
committed
fix: update widget version and improve color handling in styles
1 parent a75c0ec commit 1f4e13f

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

demo/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@
3232
const theme = { theme_name: 'chalk', theme_object: themeObject }
3333
render(
3434
html`
35-
<widget-value-1.1.7 .theme="${theme}" .inputData=${data}>
35+
<widget-value-1.1.9 .theme="${theme}" .inputData=${data}>
3636
web component is not registered. Make sure to use the tag with the correct version
3737
string from the package.json
38-
</widget-value-1.1.7>
38+
</widget-value-1.1.9>
3939
`,
4040
document.getElementById('demo')
4141
)

src/widget-value.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ export class WidgetValue extends LitElement {
141141
numberText.setAttribute(
142142
'style',
143143
`font-size: ${32 * modifier}px;
144-
${ds?.styling?.valueColor ? 'color: ' + ds?.styling?.valueColor : ''}`
144+
color: ${ds?.styling?.valueColor || this.themeTitleColor};`
145145
)
146146
})
147147

@@ -152,13 +152,13 @@ export class WidgetValue extends LitElement {
152152
labelText.setAttribute(
153153
'style',
154154
`font-size: ${26 * modifier}px;
155-
${ds?.styling?.labelColor ? 'color: ' + ds?.styling?.labelColor : ''}`
155+
color: ${ds?.styling?.labelColor || this.themeSubtitleColor};`
156156
)
157157
const unitText = n.querySelector('.unit') as HTMLDivElement
158158
unitText.setAttribute(
159159
'style',
160160
`font-size: ${26 * modifier}px;
161-
${ds?.styling?.labelColor ? 'color: ' + ds?.styling?.labelColor : ''}`
161+
color: ${ds?.styling?.labelColor || this.themeSubtitleColor};`
162162
)
163163
})
164164

0 commit comments

Comments
 (0)