My current component is receiving a node as props from its parent.
Let's assume
myComponent.propTypes = {
icon: PropTypes.node.isRequired,
}
where icon will receive something like
<Icon src="...." description="..." />
Now inside my component I just need to add
{this.props.icon} to get that rendered.
What I need is to add a prop color="#f00" to that node, in a way that it results in
<Icon src="...." description="..." color="#f00"/>
And I need to do inside myComponent. Not sure what's the right syntax to do so.