1
0
mirror of https://github.com/home-assistant/frontend.git synced 2026-05-08 09:18:34 +01:00

Fix ha-button with missing label and links (#26332)

This commit is contained in:
Wendelin
2025-07-31 12:40:17 +02:00
committed by GitHub
parent 19c2f9c9e8
commit eba1f401cc
88 changed files with 407 additions and 439 deletions
@@ -147,13 +147,13 @@ The `title ` option should not be used without a description.
<ha-alert alert-type="success">
This is a success alert — check it out!
<ha-button slot="action" label="Undo"></ha-button>
<ha-button slot="action">Undo</ha-button>
</ha-alert>
```html
<ha-alert alert-type="success">
This is a success alert — check it out!
<ha-button slot="action" label="Undo"></ha-button>
<ha-button slot="action">Undo</ha-button>
</ha-alert>
```
+4 -12
View File
@@ -78,21 +78,13 @@ const alerts: {
title: "Error with action",
description: "This is a test error alert with action",
type: "error",
actionSlot: html`<ha-button
size="small"
slot="action"
label="restart"
></ha-button>`,
actionSlot: html`<ha-button size="small" slot="action">restart</ha-button>`,
},
{
title: "Unsaved data",
description: "You have unsaved data",
type: "warning",
actionSlot: html`<ha-button
size="small"
slot="action"
label="save"
></ha-button>`,
actionSlot: html`<ha-button size="small" slot="action">save</ha-button>`,
},
{
title: "Slotted icon",
@@ -116,7 +108,7 @@ const alerts: {
title: "Slotted action",
description: "Alert with slotted action",
type: "info",
actionSlot: html`<ha-button slot="action" label="action"></ha-button>`,
actionSlot: html`<ha-button slot="action">action</ha-button>`,
},
{
description: "Dismissable information (RTL)",
@@ -128,7 +120,7 @@ const alerts: {
title: "Error with action",
description: "This is a test error alert with action (RTL)",
type: "error",
actionSlot: html`<ha-button slot="action" label="restart"></ha-button>`,
actionSlot: html`<ha-button slot="action">restart</ha-button>`,
rtl: true,
},
{
@@ -53,12 +53,13 @@ Check the [webawesome documentation](https://webawesome.com/docs/components/butt
**Properties/Attributes**
| Name | Type | Default | Description |
| ----------- | ---------------------------------------------- | -------- | -------------------------------------------------- |
| appearance | "accent"/"filled"/"plain" | "accent" | Sets the button appearance. |
| variants | "brand"/"danger"/"neutral"/"warning"/"success" | "brand" | Sets the button color variant. "brand" is default. |
| size | "small"/"medium" | "medium" | Sets the button size. |
| hideContent | Boolean | false | Hides the button content (for overlays) |
| Name | Type | Default | Description |
| ---------- | ---------------------------------------------- | -------- | --------------------------------------------------------------------------------- |
| appearance | "accent"/"filled"/"plain" | "accent" | Sets the button appearance. |
| variants | "brand"/"danger"/"neutral"/"warning"/"success" | "brand" | Sets the button color variant. "brand" is default. |
| size | "small"/"medium" | "medium" | Sets the button size. |
| loading | Boolean | false | Shows a loading indicator instead of the buttons label and disable buttons click. |
| disabled | Boolean | false | Disables the button and prevents user interaction. |
**CSS Custom Properties**