mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-24 09:46:36 +00:00
Fix energy selection date card in grid layout (#21293)
Fix energy selection card in grid layout
This commit is contained in:
parent
3e4d06fca3
commit
dc93a0ce54
@ -1,17 +1,17 @@
|
||||
import {
|
||||
html,
|
||||
LitElement,
|
||||
nothing,
|
||||
css,
|
||||
CSSResultGroup,
|
||||
LitElement,
|
||||
PropertyValues,
|
||||
css,
|
||||
html,
|
||||
nothing,
|
||||
} from "lit";
|
||||
import { customElement, property, state } from "lit/decorators";
|
||||
import { HomeAssistant } from "../../../../types";
|
||||
import "../../components/hui-energy-period-selector";
|
||||
import { LovelaceCard } from "../../types";
|
||||
import { EnergyCardBaseConfig } from "../types";
|
||||
import { hasConfigChanged } from "../../common/has-changed";
|
||||
import "../../components/hui-energy-period-selector";
|
||||
import { LovelaceCard, LovelaceLayoutOptions } from "../../types";
|
||||
import { EnergyCardBaseConfig } from "../types";
|
||||
|
||||
@customElement("hui-energy-date-selection-card")
|
||||
export class HuiEnergyDateSelectionCard
|
||||
@ -26,6 +26,13 @@ export class HuiEnergyDateSelectionCard
|
||||
return 1;
|
||||
}
|
||||
|
||||
public getLayoutOptions(): LovelaceLayoutOptions {
|
||||
return {
|
||||
grid_rows: 1,
|
||||
grid_columns: 4,
|
||||
};
|
||||
}
|
||||
|
||||
public setConfig(config: EnergyCardBaseConfig): void {
|
||||
this._config = config;
|
||||
}
|
||||
@ -57,6 +64,13 @@ export class HuiEnergyDateSelectionCard
|
||||
|
||||
static get styles(): CSSResultGroup {
|
||||
return css`
|
||||
:host {
|
||||
ha-card {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
}
|
||||
.padded {
|
||||
padding-left: 16px !important;
|
||||
padding-inline-start: 16px !important;
|
||||
|
Loading…
x
Reference in New Issue
Block a user