File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,13 @@ class CustomCoverCard extends HTMLElement {
66 //Init the card
77 if ( ! this . card ) {
88 const card = document . createElement ( 'ha-card' ) ;
9- card . header = 'Cover card' ;
9+
10+ if ( this . config . title ) {
11+ card . header = this . config . title ;
12+ } else {
13+ card . header = 'Cover card' ;
14+ }
15+
1016 this . card = card ;
1117 this . appendChild ( card ) ;
1218
@@ -129,7 +135,7 @@ class CustomCoverCard extends HTMLElement {
129135 .cc-covers { padding: 16px; }
130136 .cc-cover { display: flex; margin: 1rem 0; }
131137 .cc-cover-left { flex: 1; }
132- .cc-cover-label { font-size: 24px }
138+ .cc-cover-label { font-size: 20px; }
133139 .cc-cover-buttons { text-align: center; margin-top: 2rem; }
134140 .cc-cover-right { flex: 1; }
135141 .cc-cover-selector-picture { position: relative; margin: auto; background-size: cover; min-height: 150px; max-height: 100%; width: 153px; }
@@ -204,6 +210,7 @@ class CustomCoverCard extends HTMLElement {
204210 if ( ! config . entities ) {
205211 throw new Error ( 'You need to define entities' ) ;
206212 }
213+
207214 this . config = config ;
208215 this . maxPosition = 137 ;
209216 this . minPosition = 19 ;
You can’t perform that action at this time.
0 commit comments