mirror of
https://github.com/home-assistant/frontend.git
synced 2025-11-14 05:20:31 +00:00
Add ellipsis to ha-button label (#27391)
This commit is contained in:
@@ -223,6 +223,12 @@ export class HaButton extends Button {
|
|||||||
.button.has-end {
|
.button.has-end {
|
||||||
padding-inline-end: 8px;
|
padding-inline-end: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.label {
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
padding: var(--ha-space-1) 0;
|
||||||
|
}
|
||||||
`,
|
`,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -770,7 +770,6 @@ export class HaConfigDevicePage extends LitElement {
|
|||||||
${firstDeviceAction || actions.length
|
${firstDeviceAction || actions.length
|
||||||
? html`
|
? html`
|
||||||
<div class="card-actions" slot="actions">
|
<div class="card-actions" slot="actions">
|
||||||
<div>
|
|
||||||
<ha-button
|
<ha-button
|
||||||
href=${ifDefined(firstDeviceAction!.href)}
|
href=${ifDefined(firstDeviceAction!.href)}
|
||||||
rel=${ifDefined(
|
rel=${ifDefined(
|
||||||
@@ -779,9 +778,7 @@ export class HaConfigDevicePage extends LitElement {
|
|||||||
appearance="plain"
|
appearance="plain"
|
||||||
target=${ifDefined(firstDeviceAction!.target)}
|
target=${ifDefined(firstDeviceAction!.target)}
|
||||||
class=${ifDefined(firstDeviceAction!.classes)}
|
class=${ifDefined(firstDeviceAction!.classes)}
|
||||||
.variant=${firstDeviceAction!.classes?.includes(
|
.variant=${firstDeviceAction!.classes?.includes("warning")
|
||||||
"warning"
|
|
||||||
)
|
|
||||||
? "danger"
|
? "danger"
|
||||||
: "brand"}
|
: "brand"}
|
||||||
.action=${firstDeviceAction!.action}
|
.action=${firstDeviceAction!.action}
|
||||||
@@ -806,7 +803,6 @@ export class HaConfigDevicePage extends LitElement {
|
|||||||
`
|
`
|
||||||
: nothing}
|
: nothing}
|
||||||
</ha-button>
|
</ha-button>
|
||||||
</div>
|
|
||||||
|
|
||||||
${actions.length
|
${actions.length
|
||||||
? html`
|
? html`
|
||||||
|
|||||||
Reference in New Issue
Block a user