Update Edit Footer for Cards (#4752)

* Update CSS

* Radius Updates

* Updating to be a ha-card element
This commit is contained in:
Zack Arnett 2020-02-06 02:05:49 -05:00 committed by GitHub
parent c72105dca3
commit 2e47aa1905
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -33,6 +33,7 @@ export class HuiCardOptions extends LitElement {
protected render(): TemplateResult { protected render(): TemplateResult {
return html` return html`
<slot></slot> <slot></slot>
<ha-card>
<div class="options"> <div class="options">
<div class="primary-actions"> <div class="primary-actions">
<mwc-button @click="${this._editCard}" <mwc-button @click="${this._editCard}"
@ -86,19 +87,25 @@ export class HuiCardOptions extends LitElement {
</paper-menu-button> </paper-menu-button>
</div> </div>
</div> </div>
</ha-card>
`; `;
} }
static get styles(): CSSResult { static get styles(): CSSResult {
return css` return css`
div.options { ha-card {
border-top: 1px solid #e8e8e8; border-top-right-radius: 0;
padding: 5px 8px; border-top-left-radius: 0;
background: var(--paper-card-background-color, white);
box-shadow: rgba(0, 0, 0, 0.14) 0px 2px 2px 0px, box-shadow: rgba(0, 0, 0, 0.14) 0px 2px 2px 0px,
rgba(0, 0, 0, 0.12) 0px 1px 5px -4px, rgba(0, 0, 0, 0.12) 0px 1px 5px -4px,
rgba(0, 0, 0, 0.2) 0px 3px 1px -2px; rgba(0, 0, 0, 0.2) 0px 3px 1px -2px;
}
div.options {
border-top: 1px solid #e8e8e8;
padding: 5px 8px;
display: flex; display: flex;
margin-top: -1px;
} }
div.options .primary-actions { div.options .primary-actions {