I have a component which has props
value. This component is global and I don't want to change its source code.
I want to add pre
tag inside the value prop to have a proper indentation between title
and value
.
<component
title = {<strong>Name</strong>}
value = {<pre> {name === undefined ? myName : myNames}</pre>}
/>
Issue: I get NaN for value prop.
How do I fix it?
Also, is there a way to add a gap/padding between title
and value
? Please note that I do not wish to modify the source file of Component
.