Skip to content

Commit

Permalink
RTL fixes (#20880)
Browse files Browse the repository at this point in the history
  • Loading branch information
yosilevy authored May 27, 2024
1 parent 1dbb70b commit dfee3ba
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/ha-icon-picker.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import "@material/mwc-list/mwc-list-item";
import { ComboBoxLitRenderer } from "@vaadin/combo-box/lit";
import {
ComboBoxDataProviderCallback,
Expand All @@ -11,6 +10,7 @@ import { fireEvent } from "../common/dom/fire_event";
import { customIcons } from "../data/custom_icons";
import { HomeAssistant, ValueChangedEvent } from "../types";
import "./ha-combo-box";
import "./ha-list-item";
import "./ha-icon";

type IconItem = {
Expand Down Expand Up @@ -67,10 +67,10 @@ const loadCustomIconItems = async (iconsetPrefix: string) => {
};

const rowRenderer: ComboBoxLitRenderer<IconItem | RankedIcon> = (item) =>
html`<mwc-list-item graphic="avatar">
html`<ha-list-item graphic="avatar">
<ha-icon .icon=${item.icon} slot="graphic"></ha-icon>
${item.icon}
</mwc-list-item>`;
</ha-list-item>`;

@customElement("ha-icon-picker")
export class HaIconPicker extends LitElement {
Expand Down
1 change: 1 addition & 0 deletions src/components/ha-list-item.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ export class HaListItem extends ListItemBase {
span.material-icons:first-of-type,
span.material-icons:last-of-type {
direction: rtl !important;
--direction: rtl;
}
`
: css``,
Expand Down
1 change: 1 addition & 0 deletions src/components/ha-textfield.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ export class HaTextField extends TextFieldBase {
.mdc-floating-label,
.mdc-text-field__input[type="number"] {
direction: rtl;
--direction: rtl;
}
`
: css``,
Expand Down

0 comments on commit dfee3ba

Please sign in to comment.