mirror of
https://github.com/home-assistant/frontend.git
synced 2025-11-09 19:09:48 +00:00
Fix calendar toggle group wrapping (#27049)
This commit is contained in:
@@ -28,6 +28,9 @@ export class HaButtonToggleGroup extends LitElement {
|
|||||||
|
|
||||||
@property({ reflect: true }) size: "small" | "medium" = "medium";
|
@property({ reflect: true }) size: "small" | "medium" = "medium";
|
||||||
|
|
||||||
|
@property({ type: Boolean, reflect: true, attribute: "no-wrap" })
|
||||||
|
public nowrap = false;
|
||||||
|
|
||||||
@property() public variant:
|
@property() public variant:
|
||||||
| "brand"
|
| "brand"
|
||||||
| "neutral"
|
| "neutral"
|
||||||
@@ -71,6 +74,10 @@ export class HaButtonToggleGroup extends LitElement {
|
|||||||
:host {
|
:host {
|
||||||
--mdc-icon-size: var(--button-toggle-icon-size, 20px);
|
--mdc-icon-size: var(--button-toggle-icon-size, 20px);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
:host([no-wrap]) wa-button-group::part(base) {
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
}
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -162,6 +162,7 @@ export class HAFullCalendar extends LitElement {
|
|||||||
.buttons=${viewToggleButtons}
|
.buttons=${viewToggleButtons}
|
||||||
.active=${this._activeView}
|
.active=${this._activeView}
|
||||||
size="small"
|
size="small"
|
||||||
|
no-wrap
|
||||||
@value-changed=${this._handleView}
|
@value-changed=${this._handleView}
|
||||||
></ha-button-toggle-group>
|
></ha-button-toggle-group>
|
||||||
`
|
`
|
||||||
@@ -197,6 +198,7 @@ export class HAFullCalendar extends LitElement {
|
|||||||
.buttons=${viewToggleButtons}
|
.buttons=${viewToggleButtons}
|
||||||
.active=${this._activeView}
|
.active=${this._activeView}
|
||||||
size="small"
|
size="small"
|
||||||
|
no-wrap
|
||||||
@value-changed=${this._handleView}
|
@value-changed=${this._handleView}
|
||||||
></ha-button-toggle-group>
|
></ha-button-toggle-group>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user