mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-28 11:46:42 +00:00
RTL support for arrows in scrolable tabs (#2696)
* RTL support for arrows in scrolable tabs * Refactor
This commit is contained in:
parent
17d0ae003a
commit
102cb06d28
@ -49,7 +49,7 @@ import { showEditLovelaceDialog } from "./editor/lovelace-editor/show-edit-lovel
|
|||||||
import { Lovelace } from "./types";
|
import { Lovelace } from "./types";
|
||||||
import { afterNextRender } from "../../common/util/render-status";
|
import { afterNextRender } from "../../common/util/render-status";
|
||||||
import { haStyle } from "../../resources/ha-style";
|
import { haStyle } from "../../resources/ha-style";
|
||||||
import { computeRTL } from "../../common/util/compute_rtl";
|
import { computeRTL, computeRTLDirection } from "../../common/util/compute_rtl";
|
||||||
|
|
||||||
// CSS and JS should only be imported once. Modules and HTML are safe.
|
// CSS and JS should only be imported once. Modules and HTML are safe.
|
||||||
const CSS_CACHE = {};
|
const CSS_CACHE = {};
|
||||||
@ -244,6 +244,7 @@ class HUIRoot extends LitElement {
|
|||||||
scrollable
|
scrollable
|
||||||
.selected="${this._curView}"
|
.selected="${this._curView}"
|
||||||
@iron-activate="${this._handleViewSelected}"
|
@iron-activate="${this._handleViewSelected}"
|
||||||
|
dir="${computeRTLDirection(this.hass!)}"
|
||||||
>
|
>
|
||||||
${this.lovelace!.config.views.map(
|
${this.lovelace!.config.views.map(
|
||||||
(view) => html`
|
(view) => html`
|
||||||
|
Loading…
x
Reference in New Issue
Block a user