1
0
mirror of https://gitlab.nic.cz/turris/reforis/foris-js.git synced 2024-12-25 00:11:36 +01:00

Fix Alert's dismissible class condition

This commit is contained in:
Aleksandr Gumroian 2020-09-14 12:08:53 +02:00
parent defc363f01
commit 1c986519f6
No known key found for this signature in database
GPG Key ID: 9E77849C64F0A733

View File

@ -37,7 +37,11 @@ Alert.defaultProps = {
export function Alert({ type, onDismiss, children }) {
return (
<div className={`alert alert-dismissible alert-${type}`}>
<div
className={`alert ${
onDismiss ? "alert-dismissible" : ""
} alert-${type}`}
>
{onDismiss ? (
<button type="button" className="close" onClick={onDismiss}>
&times;