From 1530c0c38663b129b6cd2a5b5cdf873dbaf76bcc Mon Sep 17 00:00:00 2001 From: Andrey Date: Sun, 9 Apr 2017 20:25:00 +0300 Subject: [PATCH] Allow custom 2nd line in state-info (#253) * Allow custom 2nd line in state-info * add tests for new functionality --- src/components/entity/state-info.html | 8 +++++--- test/state-info-test.html | 26 ++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 3 deletions(-) diff --git a/src/components/entity/state-info.html b/src/components/entity/state-info.html index c181c1c827..634ed47e76 100644 --- a/src/components/entity/state-info.html +++ b/src/components/entity/state-info.html @@ -27,11 +27,11 @@ line-height: 40px; } - .name[in-dialog] { + .name[in-dialog], :host([secondary-line]) .name { line-height: 20px; } - .time-ago { + .time-ago, ::slotted(*) { @apply(--paper-font-common-nowrap); color: var(--secondary-text-color); } @@ -48,7 +48,9 @@ - + diff --git a/test/state-info-test.html b/test/state-info-test.html index 7846286ce4..6319d39bef 100644 --- a/test/state-info-test.html +++ b/test/state-info-test.html @@ -6,6 +6,11 @@ + + +