Add haStyleScrollbar to hass-subpage (#16745)

This commit is contained in:
Joakim Sørensen 2023-06-21 11:35:17 +02:00 committed by GitHub
parent 5aa6ffe2e4
commit b46c74fe76
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -13,6 +13,7 @@ import { computeRTL } from "../common/util/compute_rtl";
import "../components/ha-icon-button-arrow-prev";
import "../components/ha-menu-button";
import { HomeAssistant } from "../types";
import { haStyleScrollbar } from "../resources/styles";
@customElement("hass-subpage")
class HassSubpage extends LitElement {
@ -73,7 +74,9 @@ class HassSubpage extends LitElement {
<div class="main-title"><slot name="header">${this.header}</slot></div>
<slot name="toolbar-icon"></slot>
</div>
<div class="content" @scroll=${this._saveScrollPos}><slot></slot></div>
<div class="content ha-scrollbar" @scroll=${this._saveScrollPos}>
<slot></slot>
</div>
<div id="fab">
<slot name="fab"></slot>
</div>
@ -94,7 +97,9 @@ class HassSubpage extends LitElement {
}
static get styles(): CSSResultGroup {
return css`
return [
haStyleScrollbar,
css`
:host {
display: block;
height: 100%;
@ -175,7 +180,8 @@ class HassSubpage extends LitElement {
left: 24px;
right: auto;
}
`;
`,
];
}
}