mirror of
https://github.com/home-assistant/frontend.git
synced 2025-08-01 13:37:47 +00:00
Fix button position entity settings dialog (#6395)
This commit is contained in:
parent
a9071d7920
commit
9ad9c569a6
@ -51,7 +51,7 @@ export class HaDialog extends MwcDialog {
|
||||
padding: var(--dialog-content-padding, 20px 24px);
|
||||
}
|
||||
.mdc-dialog .mdc-dialog__surface {
|
||||
position: var(--dialog-content-position, relative);
|
||||
position: var(--dialog-surface-position, relative);
|
||||
min-height: var(--mdc-dialog-min-height, auto);
|
||||
}
|
||||
.header_button {
|
||||
|
@ -248,6 +248,7 @@ export class MoreInfoDialog extends LitElement {
|
||||
haStyleDialog,
|
||||
css`
|
||||
ha-dialog {
|
||||
--dialog-surface-position: static;
|
||||
--dialog-content-position: static;
|
||||
}
|
||||
|
||||
|
@ -245,6 +245,7 @@ export class DialogEntityEditor extends LitElement {
|
||||
}
|
||||
|
||||
ha-dialog {
|
||||
--dialog-content-position: static;
|
||||
--dialog-content-padding: 0;
|
||||
}
|
||||
|
||||
|
@ -52,6 +52,7 @@ import "../../../helpers/forms/ha-input_select-form";
|
||||
import "../../../helpers/forms/ha-input_text-form";
|
||||
import "../../entity-registry-basic-editor";
|
||||
import type { HaEntityRegistryBasicEditor } from "../../entity-registry-basic-editor";
|
||||
import { haStyle } from "../../../../../resources/styles";
|
||||
|
||||
const HELPERS = {
|
||||
input_boolean: {
|
||||
@ -219,35 +220,42 @@ export class EntityRegistrySettingsHelper extends LitElement {
|
||||
}
|
||||
}
|
||||
|
||||
static get styles(): CSSResult {
|
||||
return css`
|
||||
:host {
|
||||
display: block;
|
||||
padding: 0 !important;
|
||||
}
|
||||
.form {
|
||||
padding: 20px 24px;
|
||||
}
|
||||
.buttons {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 8px;
|
||||
margin-bottom: -20px;
|
||||
}
|
||||
mwc-button.warning {
|
||||
--mdc-theme-primary: var(--error-color);
|
||||
}
|
||||
.error {
|
||||
color: var(--error-color);
|
||||
}
|
||||
.row {
|
||||
margin-top: 8px;
|
||||
color: var(--primary-text-color);
|
||||
}
|
||||
.secondary {
|
||||
color: var(--secondary-text-color);
|
||||
}
|
||||
`;
|
||||
static get styles(): CSSResult[] {
|
||||
return [
|
||||
haStyle,
|
||||
css`
|
||||
:host {
|
||||
display: block;
|
||||
padding: 0 !important;
|
||||
}
|
||||
.form {
|
||||
padding: 20px 24px;
|
||||
margin-bottom: 53px;
|
||||
}
|
||||
.buttons {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
border-top: 1px solid
|
||||
var(--mdc-dialog-scroll-divider-color, rgba(0, 0, 0, 0.12));
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 8px;
|
||||
background-color: var(--mdc-theme-surface, #fff);
|
||||
}
|
||||
.error {
|
||||
color: var(--error-color);
|
||||
}
|
||||
.row {
|
||||
margin-top: 8px;
|
||||
color: var(--primary-text-color);
|
||||
}
|
||||
.secondary {
|
||||
color: var(--secondary-text-color);
|
||||
}
|
||||
`,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -226,19 +226,22 @@ export class EntityRegistrySettings extends LitElement {
|
||||
css`
|
||||
:host {
|
||||
display: block;
|
||||
margin-bottom: 0 !important;
|
||||
padding: 0 !important;
|
||||
}
|
||||
.form {
|
||||
padding: 20px 24px;
|
||||
margin-bottom: 53px;
|
||||
}
|
||||
.buttons {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
border-top: 1px solid
|
||||
var(--mdc-dialog-scroll-divider-color, rgba(0, 0, 0, 0.12));
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
justify-content: space-between;
|
||||
padding: 8px;
|
||||
}
|
||||
mwc-button.warning {
|
||||
margin-right: auto;
|
||||
background-color: var(--mdc-theme-surface, #fff);
|
||||
}
|
||||
ha-switch {
|
||||
margin-right: 16px;
|
||||
|
Loading…
x
Reference in New Issue
Block a user