Is there a way to have a multi-line alert description that also includes HTML (ie <code>
tags)
It seems that the description is escaped, so any markup or \n
is rendered literally, eg https://codepen.io/anon/pen/awzNzP?editors=001.
Ok, I figured it out. I failed to notice that the description
property can be a ReactNode
, so you can do this
descriptionElement = (
<code>
Line 1
<br />
Line 2
</code>
)
<Alert message='test' type='info' description={descriptionElement} />
Running version
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With