Capitalize first character of attributes (#7313)

This commit is contained in:
Philip Allgaier 2020-10-12 11:43:46 +02:00 committed by GitHub
parent 44166f76d4
commit 97ca0b818e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -33,7 +33,9 @@ class HaAttributes extends LitElement {
).map(
(attribute) => html`
<div class="data-entry">
<div class="key">${attribute.replace(/_/g, " ")}</div>
<div class="key">
${attribute.replace(/_/g, " ").replace("id", "ID")}
</div>
<div class="value">
${this.formatAttribute(attribute)}
</div>
@ -62,6 +64,9 @@ class HaAttributes extends LitElement {
max-width: 200px;
overflow-wrap: break-word;
}
.key:first-letter {
text-transform: capitalize;
}
.attribution {
color: var(--secondary-text-color);
text-align: right;