mirror of
https://github.com/flarum/core.git
synced 2025-08-05 16:07:34 +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 (
|
return (
|
||||||
<div {...attrs}>
|
<div {...attrs}>
|
||||||
<div className={classList('Alert-container', attrs.containerClassName)}>
|
<div className={classList('Alert-container', attrs.containerClassName)}>
|
||||||
{!!title && (
|
<div className="Alert-content">
|
||||||
<div className="Alert-title">
|
{!!title && (
|
||||||
{!!icon && (
|
<div className="Alert-title">
|
||||||
<span className="Alert-title-icon">
|
{!!icon && (
|
||||||
<Icon name={icon} />
|
<span className="Alert-title-icon">
|
||||||
</span>
|
<Icon name={icon} />
|
||||||
)}
|
</span>
|
||||||
<span className="Alert-title-text">{title}</span>
|
)}
|
||||||
</div>
|
<span className="Alert-title-text">{title}</span>
|
||||||
)}
|
</div>
|
||||||
<span className="Alert-body">{content}</span>
|
)}
|
||||||
|
<span className="Alert-body">{content}</span>
|
||||||
|
</div>
|
||||||
<ul className="Alert-controls">{listItems(controls.concat(dismissControl))}</ul>
|
<ul className="Alert-controls">{listItems(controls.concat(dismissControl))}</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -67,13 +67,17 @@
|
|||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.Alert-content {
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
.Alert-title {
|
.Alert-title {
|
||||||
margin-bottom: 8px;
|
margin-bottom: 8px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
}
|
}
|
||||||
.Alert-container {
|
.Alert-container,
|
||||||
|
.Alert-content,
|
||||||
|
.Alert-title {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user