mirror of
https://github.com/home-assistant/frontend.git
synced 2025-11-09 02:49:51 +00:00
Add confirmation button in lock more info (#20093)
* Add confirmation button in more info lock * Reset confirm open on service call * Use text instead of toast for success
This commit is contained in:
@@ -84,6 +84,7 @@ export class HaControlButton extends LitElement {
|
||||
--control-button-background-color: var(--disabled-color);
|
||||
--control-button-background-opacity: 0.2;
|
||||
--control-button-border-radius: 10px;
|
||||
--control-button-padding: 8px;
|
||||
--mdc-icon-size: 20px;
|
||||
color: var(--primary-text-color);
|
||||
width: 40px;
|
||||
@@ -95,16 +96,20 @@ export class HaControlButton extends LitElement {
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: var(--control-button-border-radius);
|
||||
border: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
padding: var(--control-button-padding);
|
||||
box-sizing: border-box;
|
||||
line-height: 0;
|
||||
line-height: inherit;
|
||||
font-family: Roboto;
|
||||
font-weight: 500;
|
||||
outline: none;
|
||||
overflow: hidden;
|
||||
background: none;
|
||||
@@ -126,6 +131,8 @@ export class HaControlButton extends LitElement {
|
||||
background-color 180ms ease-in-out,
|
||||
opacity 180ms ease-in-out;
|
||||
opacity: var(--control-button-background-opacity);
|
||||
pointer-events: none;
|
||||
white-space: normal;
|
||||
}
|
||||
.button {
|
||||
transition: color 180ms ease-in-out;
|
||||
@@ -133,6 +140,7 @@ export class HaControlButton extends LitElement {
|
||||
}
|
||||
.button ::slotted(*) {
|
||||
pointer-events: none;
|
||||
opacity: 0.95;
|
||||
}
|
||||
.button:disabled {
|
||||
cursor: not-allowed;
|
||||
|
||||
Reference in New Issue
Block a user