mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-17 14:26:35 +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",
|
||||
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",
|
||||
description: "This is a test success alert with a title and description",
|
||||
|
@ -45,21 +45,19 @@ class HaAlert extends LitElement {
|
||||
public render() {
|
||||
return html`
|
||||
<div
|
||||
class=${classMap({
|
||||
"issue-type": true,
|
||||
class="issue-type ${classMap({
|
||||
rtl: this.rtl,
|
||||
[this.alertType]: true,
|
||||
})}
|
||||
})}"
|
||||
>
|
||||
<div class="icon">
|
||||
<ha-svg-icon .path=${ALERT_ICONS[this.alertType]}></ha-svg-icon>
|
||||
</div>
|
||||
<div class="content">
|
||||
<div
|
||||
class=${classMap({
|
||||
"main-content": true,
|
||||
class="main-content ${classMap({
|
||||
"no-title": !this.title,
|
||||
})}
|
||||
})}"
|
||||
>
|
||||
${this.title ? html`<div class="title">${this.title}</div>` : ""}
|
||||
<slot></slot>
|
||||
@ -129,6 +127,9 @@ class HaAlert extends LitElement {
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
}
|
||||
.main-content {
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
.title {
|
||||
font-weight: bold;
|
||||
margin-top: 6px;
|
||||
|
Loading…
x
Reference in New Issue
Block a user