Merge pull request 'feature/paymentPix' (#3) from feature/paymentPix into development

Reviewed-on: #3
This commit is contained in:
Savio Carvalho Moraes 2023-02-05 18:32:12 +00:00
commit c674957856
11 changed files with 49 additions and 35 deletions

3
react/PaymentPix.tsx Normal file
View File

@ -0,0 +1,3 @@
import { PaymentPix } from "./components/PaymentPix/PaymentPix";
export default PaymentPix;

View File

@ -1,3 +0,0 @@
import { ProductDescription } from "./components/ProductDescription/ProductDescription";
export default ProductDescription;

View File

@ -0,0 +1,23 @@
import React from "react";
import { useProduct } from "vtex.product-context";
const PaymentPix = () => {
const product = useProduct();
const pricePix = (
(product?.product?.priceRange.sellingPrice.highPrice || 0.0) * 0.9
).toFixed(2);
{
/*const imagePix =*/
}
const convertPrice = pricePix.toString().replace(".", ",");
return (
<div>
<p>R$ {convertPrice}</p>
<p>10% de desconto</p>
</div>
);
};
export { PaymentPix };

View File

@ -1,7 +0,0 @@
import React from "react";
const ProductDescription = () => {
return <div>Oaswq</div>;
};
export { ProductDescription };

View File

@ -2,7 +2,9 @@
"store.product": {
"children": [
"html#breadcrumb",
"condition-layout.product#availability",
"flex-layout.row#description",
"flex-layout.row#specifications-title",
"tab-layout#product",
@ -117,6 +119,7 @@
"flex-layout.row#list-price-savings",
"flex-layout.row#selling-price",
"product-installments",
"product-paymentPix-component",
"product-separator",
"product-identifier.product",
"sku-selector",

View File

@ -6,7 +6,7 @@
"component": "html",
"composition": "children"
},
"product-payment-component": {
"component": "ProductDescription"
"product-paymentPix-component": {
"component": "PaymentPix"
}
}

View File

@ -14,8 +14,3 @@
.homeLink::after {
content: "Home";
}
.link--1 {
display: flex;
order: -1;
}

View File

@ -7,6 +7,7 @@
*/
/* Media Query M3 */
/* Grid breakpoints */
.productDescriptionContainer {
/*.productDescriptionContainer {
background: red;
}
*/

View File

@ -6,7 +6,3 @@
content: "Home";
}
}
.link--1 {
display: flex;
order: -1;
}

View File

@ -1,3 +1,4 @@
.productDescriptionContainer {
/*.productDescriptionContainer {
background: red;
}
*/

View File

@ -1,3 +1,5 @@
@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;500;600;700&display=swap");
$color-black: #292929;
$color-white: #fff;
@ -14,18 +16,18 @@ $color-green: #4caf50;
/* Grid breakpoints */
$grid-breakpoints: (
xs: 0,
cstm: 400,
sm: 576px,
md: 768px,
lg: 992px,
xl: 1200px
xs: 0,
cstm: 400,
sm: 576px,
md: 768px,
lg: 992px,
xl: 1200px,
) !default;
$z-index: (
level1: 5,
level2: 10,
level3: 15,
level4: 20,
level5: 25
level1: 5,
level2: 10,
level3: 15,
level4: 20,
level5: 25,
) !default;