Use a <ha-card> instead of <div> .

This commit is contained in:
Dermot Duffy
2021-08-10 20:54:09 -07:00
parent 73f2206c8a
commit 8a89a5e4c2
2 changed files with 2 additions and 11 deletions
-6
View File
@@ -54,11 +54,6 @@
border-color: var(--primary-color); border-color: var(--primary-color);
} }
.frigate-card-container {
position: relative;
overflow: hidden;
}
.frigate-card-navbar { .frigate-card-navbar {
position: absolute; position: absolute;
width: 50px; width: 50px;
@@ -89,7 +84,6 @@ ha-icon-button.button {
ha-card { ha-card {
display: flex; display: flex;
justify-content: center;
flex-direction: column; flex-direction: column;
margin: auto; margin: auto;
overflow: hidden; overflow: hidden;
+2 -5
View File
@@ -482,10 +482,7 @@ export class FrigateCard extends LitElement {
return this._showError(localize('common.show_error')); return this._showError(localize('common.show_error'));
} }
return html` return html`
<div <ha-card @click=${this._interactionHandler}>
class="frigate-card-container"
@click=${this._interactionHandler}
>
${this._renderNavigationBar()} ${this._renderNavigationBar()}
${this._viewMode == FrigateCardView.CLIPS ? ${this._viewMode == FrigateCardView.CLIPS ?
html`<div class="frigate-card-gallery"> html`<div class="frigate-card-gallery">
@@ -509,7 +506,7 @@ export class FrigateCard extends LitElement {
} }
${this._renderStatusBar()} ${this._renderStatusBar()}
${this._renderLiveViewer()} ${this._renderLiveViewer()}
</div>`; </ha-card>`;
} }
// private _handleAction(ev: ActionHandlerEvent): void { // private _handleAction(ev: ActionHandlerEvent): void {