mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-26 02:36:37 +00:00
Add haStyleScrollbar to hass-subpage (#16745)
This commit is contained in:
parent
5aa6ffe2e4
commit
b46c74fe76
@ -13,6 +13,7 @@ import { computeRTL } from "../common/util/compute_rtl";
|
|||||||
import "../components/ha-icon-button-arrow-prev";
|
import "../components/ha-icon-button-arrow-prev";
|
||||||
import "../components/ha-menu-button";
|
import "../components/ha-menu-button";
|
||||||
import { HomeAssistant } from "../types";
|
import { HomeAssistant } from "../types";
|
||||||
|
import { haStyleScrollbar } from "../resources/styles";
|
||||||
|
|
||||||
@customElement("hass-subpage")
|
@customElement("hass-subpage")
|
||||||
class HassSubpage extends LitElement {
|
class HassSubpage extends LitElement {
|
||||||
@ -73,7 +74,9 @@ class HassSubpage extends LitElement {
|
|||||||
<div class="main-title"><slot name="header">${this.header}</slot></div>
|
<div class="main-title"><slot name="header">${this.header}</slot></div>
|
||||||
<slot name="toolbar-icon"></slot>
|
<slot name="toolbar-icon"></slot>
|
||||||
</div>
|
</div>
|
||||||
<div class="content" @scroll=${this._saveScrollPos}><slot></slot></div>
|
<div class="content ha-scrollbar" @scroll=${this._saveScrollPos}>
|
||||||
|
<slot></slot>
|
||||||
|
</div>
|
||||||
<div id="fab">
|
<div id="fab">
|
||||||
<slot name="fab"></slot>
|
<slot name="fab"></slot>
|
||||||
</div>
|
</div>
|
||||||
@ -94,7 +97,9 @@ class HassSubpage extends LitElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static get styles(): CSSResultGroup {
|
static get styles(): CSSResultGroup {
|
||||||
return css`
|
return [
|
||||||
|
haStyleScrollbar,
|
||||||
|
css`
|
||||||
:host {
|
:host {
|
||||||
display: block;
|
display: block;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
@ -175,7 +180,8 @@ class HassSubpage extends LitElement {
|
|||||||
left: 24px;
|
left: 24px;
|
||||||
right: auto;
|
right: auto;
|
||||||
}
|
}
|
||||||
`;
|
`,
|
||||||
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user