challenge-vtex-io/react/components/Example/paymentWithPix.tsx

25 lines
616 B
TypeScript
Raw Normal View History

import React from 'react';
import {useProduct} from 'vtex.product-context';
2023-02-10 19:00:05 +00:00
const PaymentWithPix =() => {
const product = useProduct();
2023-02-10 19:00:05 +00:00
let imagePix = "https://agenciamagma.vtexassets.com/arquivos/pix-image-victor_souza.svg"
return (
2023-02-10 19:00:05 +00:00
<div className="wrapperPix">
<img className="wrapperPixImage" src={imagePix} alt="Imagem do icone do pix" />
<div className="wrapperPrices">
<p className="wrapperTitle">{(product?.product?.priceRange.sellingPrice.highPrice || 0) * (0.9)}</p>
<p className="wrapperSubtitle">R$ 10 % de desconto</p>
</div>
</div>
)
}
2023-02-10 19:00:05 +00:00
export default PaymentWithPix;