Given a component Product with a props interface ProductProps defined:
interface ProductProps {
name: string,
price: {
amount: number,
currency: string
}
}
how do I assign the values for price in the component tag i.e. I want something to the effect of:
<Product name="Nice Shoes" price.amount={100} price.currency="$" />
<Product name="Nice Shoes" price={{amount :100, currency:"$"}} />