Pass And Amend Element Props With A React Function
This is with a spread and destructuring
Code
return <div className=`} {...rest} />
}
const element = (
<Box className="blue" style={{fontStyle: 'italic'}}>
This is the box
</Box>
)
results in:
Code
This is the box