mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-18 23:06:40 +00:00
Break overflow in ha-alert (#9885)
This commit is contained in:
parent
dfea80ae96
commit
2ab0e40952
@ -26,6 +26,12 @@ const alerts: {
|
|||||||
description: "This is a test error alert with a title and description",
|
description: "This is a test error alert with a title and description",
|
||||||
type: "error",
|
type: "error",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: "Test warning with long string",
|
||||||
|
description:
|
||||||
|
"sensor.lorem_ipsum_lorem_ipsum_lorem_ipsum_lorem_ipsum_lorem_ipsum_lorem_ipsum_lorem_ipsum_lorem_ipsum_lorem_ipsum_lorem_ipsum_lorem_ipsum_lorem_ipsum",
|
||||||
|
type: "warning",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: "Test success alert",
|
title: "Test success alert",
|
||||||
description: "This is a test success alert with a title and description",
|
description: "This is a test success alert with a title and description",
|
||||||
|
@ -45,21 +45,19 @@ class HaAlert extends LitElement {
|
|||||||
public render() {
|
public render() {
|
||||||
return html`
|
return html`
|
||||||
<div
|
<div
|
||||||
class=${classMap({
|
class="issue-type ${classMap({
|
||||||
"issue-type": true,
|
|
||||||
rtl: this.rtl,
|
rtl: this.rtl,
|
||||||
[this.alertType]: true,
|
[this.alertType]: true,
|
||||||
})}
|
})}"
|
||||||
>
|
>
|
||||||
<div class="icon">
|
<div class="icon">
|
||||||
<ha-svg-icon .path=${ALERT_ICONS[this.alertType]}></ha-svg-icon>
|
<ha-svg-icon .path=${ALERT_ICONS[this.alertType]}></ha-svg-icon>
|
||||||
</div>
|
</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div
|
<div
|
||||||
class=${classMap({
|
class="main-content ${classMap({
|
||||||
"main-content": true,
|
|
||||||
"no-title": !this.title,
|
"no-title": !this.title,
|
||||||
})}
|
})}"
|
||||||
>
|
>
|
||||||
${this.title ? html`<div class="title">${this.title}</div>` : ""}
|
${this.title ? html`<div class="title">${this.title}</div>` : ""}
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
@ -129,6 +127,9 @@ class HaAlert extends LitElement {
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
.main-content {
|
||||||
|
overflow-wrap: anywhere;
|
||||||
|
}
|
||||||
.title {
|
.title {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
margin-top: 6px;
|
margin-top: 6px;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user