mirror of
https://github.com/flarum/core.git
synced 2025-08-05 07:57:46 +02:00
fix: alert component broken layout (#4087)
This commit is contained in:
@@ -61,17 +61,19 @@ export default class Alert<T extends AlertAttrs = AlertAttrs> extends Component<
|
||||
return (
|
||||
<div {...attrs}>
|
||||
<div className={classList('Alert-container', attrs.containerClassName)}>
|
||||
{!!title && (
|
||||
<div className="Alert-title">
|
||||
{!!icon && (
|
||||
<span className="Alert-title-icon">
|
||||
<Icon name={icon} />
|
||||
</span>
|
||||
)}
|
||||
<span className="Alert-title-text">{title}</span>
|
||||
</div>
|
||||
)}
|
||||
<span className="Alert-body">{content}</span>
|
||||
<div className="Alert-content">
|
||||
{!!title && (
|
||||
<div className="Alert-title">
|
||||
{!!icon && (
|
||||
<span className="Alert-title-icon">
|
||||
<Icon name={icon} />
|
||||
</span>
|
||||
)}
|
||||
<span className="Alert-title-text">{title}</span>
|
||||
</div>
|
||||
)}
|
||||
<span className="Alert-body">{content}</span>
|
||||
</div>
|
||||
<ul className="Alert-controls">{listItems(controls.concat(dismissControl))}</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -67,13 +67,17 @@
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
.Alert-content {
|
||||
flex-direction: column;
|
||||
}
|
||||
.Alert-title {
|
||||
margin-bottom: 8px;
|
||||
font-weight: bold;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
.Alert-container {
|
||||
.Alert-container,
|
||||
.Alert-content,
|
||||
.Alert-title {
|
||||
display: flex;
|
||||
}
|
||||
|
Reference in New Issue
Block a user