how to break lines on \n in the text when using <card>
Posted: 01 Jun 2023, 17:50
Hi,
I'm using <card> inside timeline component to display content.
Here is the code:
<Card /* title={item.status} subTitle={item.date} */>
{item.image && <img src={`assets/demo/images/product/${item.image}`} onError={(e) => (e.target.src = 'https://www.primefaces.org/wp-content/u ... holder.png')} alt={item.name} width={200} className="shadow-2 mb-3" />}
<p>
{item.text}
</p>
<p>
{item.status}
</p>
</Card>
The {item.text} comes with \n. How to break lines on \n in <Card> component to allow multiple lines to be displayed?
Thanks,
James
I'm using <card> inside timeline component to display content.
Here is the code:
<Card /* title={item.status} subTitle={item.date} */>
{item.image && <img src={`assets/demo/images/product/${item.image}`} onError={(e) => (e.target.src = 'https://www.primefaces.org/wp-content/u ... holder.png')} alt={item.name} width={200} className="shadow-2 mb-3" />}
<p>
{item.text}
</p>
<p>
{item.status}
</p>
</Card>
The {item.text} comes with \n. How to break lines on \n in <Card> component to allow multiple lines to be displayed?
Thanks,
James