Reputation: 227
Is there a way to make part of a prob that contains strings bold? I've tried the array method but I've heard its not the correct way to do it
<ListItemText primary={thread.data.title} secondary={"Author: " + thread.data.author} />
I would like the "Author: " to be bold
Upvotes: 3
Views: 209
Reputation: 15821
In react props could be anything: functions, string, objects and...JSX Try:
<ListItemText
primary={thread.data.title}
secondary={<span><b>Author</b>{thread.data.author}</span>} />
Upvotes: 5