feat:Cria área do pix
This commit is contained in:
parent
525b66a40a
commit
d109da7760
3
react/Pix.tsx
Normal file
3
react/Pix.tsx
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
import Pix from "./components/Pix/Pix";
|
||||||
|
|
||||||
|
export default Pix;
|
87
react/components/Pix/Pix.tsx
Normal file
87
react/components/Pix/Pix.tsx
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
import React, { useEffect, useState } from "react";
|
||||||
|
import { useProduct } from "vtex.product-context";
|
||||||
|
import "./style.css";
|
||||||
|
|
||||||
|
const Pix = () => {
|
||||||
|
const productContext = useProduct();
|
||||||
|
|
||||||
|
const [pixValue, setPixValue] = useState(0);
|
||||||
|
const [discountValue, setDiscountValue] = useState("");
|
||||||
|
|
||||||
|
const objectPass = [
|
||||||
|
{
|
||||||
|
id: productContext?.selectedItem?.itemId,
|
||||||
|
quantity: 1,
|
||||||
|
seller: productContext?.selectedItem?.sellers[0].sellerId,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
function getDiscount(discountValue: number, commonValue: number | undefined) {
|
||||||
|
let discount = 0;
|
||||||
|
if (commonValue) {
|
||||||
|
discount = Math.floor(discountValue / commonValue) - 100;
|
||||||
|
|
||||||
|
if (discount > 0) return `${discount} % de desconto`;
|
||||||
|
else return "sem desconto";
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
async function request() {
|
||||||
|
const response = await fetch("/api/checkout/pub/orderForms/simulation", {
|
||||||
|
method: "POST",
|
||||||
|
headers: {
|
||||||
|
"content-type": "application/json",
|
||||||
|
},
|
||||||
|
body: JSON.stringify({
|
||||||
|
items: objectPass,
|
||||||
|
country: "BRA",
|
||||||
|
postalCode: "",
|
||||||
|
}),
|
||||||
|
});
|
||||||
|
|
||||||
|
const data = await response.json();
|
||||||
|
|
||||||
|
const getPix = data.paymentData.installmentOptions.find(
|
||||||
|
(e: { paymentName: string }) => {
|
||||||
|
return e.paymentName === "Pix";
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
setPixValue(getPix.value);
|
||||||
|
|
||||||
|
const discountMessage = getDiscount(
|
||||||
|
getPix.value,
|
||||||
|
productContext?.product?.priceRange.sellingPrice.highPrice
|
||||||
|
);
|
||||||
|
|
||||||
|
if (discountMessage) setDiscountValue(discountMessage);
|
||||||
|
}
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
request();
|
||||||
|
}, [productContext?.selectedItem]);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className="pix-container">
|
||||||
|
<img
|
||||||
|
className="pix-image"
|
||||||
|
src="https://agenciamagma.vteximg.com.br/arquivos/pix-icon-sauloklein-m3academy.svg"
|
||||||
|
alt="Pix Icon"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<div className="price-wrapper">
|
||||||
|
<span className="price-value">
|
||||||
|
{(pixValue / 100).toLocaleString("pt-br", {
|
||||||
|
style: "currency",
|
||||||
|
currency: "BRL",
|
||||||
|
})}
|
||||||
|
</span>
|
||||||
|
<span className="price-discount">{discountValue}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default Pix;
|
30
react/components/Pix/style.css
Normal file
30
react/components/Pix/style.css
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
[class*="pix-container"] {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin: 8px 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
[class*="price-wrapper"] {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
margin: 0 0 0 26px;
|
||||||
|
}
|
||||||
|
|
||||||
|
[class*="pix-image"] {
|
||||||
|
width: 66px;
|
||||||
|
height: 24px;
|
||||||
|
}
|
||||||
|
|
||||||
|
[class*="price-value"] {
|
||||||
|
font-weight: 700;
|
||||||
|
font-size: 18px;
|
||||||
|
line-height: 25px;
|
||||||
|
color: rgba(0, 0, 0, 0.58);
|
||||||
|
}
|
||||||
|
|
||||||
|
[class*="price-discount"] {
|
||||||
|
font-weight: 300;
|
||||||
|
font-size: 13px;
|
||||||
|
line-height: 18px;
|
||||||
|
color: #929292;
|
||||||
|
}
|
@ -100,6 +100,20 @@
|
|||||||
"showPaginationDots": false
|
"showPaginationDots": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
"product-installments": {
|
||||||
|
"props": {
|
||||||
|
"blockClass": "sellingInfo"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
"flex-layout.row#selling-prices": {
|
||||||
|
"props": {
|
||||||
|
"blockClass": "sellingPrice"
|
||||||
|
},
|
||||||
|
"children": ["product-selling-price"]
|
||||||
|
},
|
||||||
|
|
||||||
"flex-layout.col#right-col": {
|
"flex-layout.col#right-col": {
|
||||||
"props": {
|
"props": {
|
||||||
"preventVerticalStretch": true,
|
"preventVerticalStretch": true,
|
||||||
@ -109,12 +123,13 @@
|
|||||||
"flex-layout.row#product-name",
|
"flex-layout.row#product-name",
|
||||||
"product-rating-summary",
|
"product-rating-summary",
|
||||||
//"flex-layout.row#list-price-savings",
|
//"flex-layout.row#list-price-savings",
|
||||||
"flex-layout.row#selling-price",
|
"flex-layout.row#selling-prices",
|
||||||
"product-installments",
|
"product-installments",
|
||||||
"product-separator",
|
"pix-component",
|
||||||
"product-identifier.product",
|
//"product-separator",
|
||||||
"sku-selector",
|
"sku-selector",
|
||||||
"product-quantity",
|
"product-identifier.product",
|
||||||
|
//"product-quantity",
|
||||||
"product-assembly-options",
|
"product-assembly-options",
|
||||||
"product-gifts",
|
"product-gifts",
|
||||||
"flex-layout.row#buy-button",
|
"flex-layout.row#buy-button",
|
||||||
@ -138,12 +153,27 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
"product-quantity": {
|
||||||
|
"props": {
|
||||||
|
"size": "large",
|
||||||
|
"showLabel": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
"add-to-cart-button": {
|
||||||
|
"props": {
|
||||||
|
"blockClass": "addToCartButton",
|
||||||
|
"text": "ADICIONAR À SACOLA"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
"flex-layout.row#buy-button": {
|
"flex-layout.row#buy-button": {
|
||||||
"props": {
|
"props": {
|
||||||
"marginTop": 4,
|
"marginTop": 4,
|
||||||
"marginBottom": 7
|
"marginBottom": 7,
|
||||||
|
"blockClass": "quantityAndBuy"
|
||||||
},
|
},
|
||||||
"children": ["add-to-cart-button"]
|
"children": ["product-quantity", "add-to-cart-button"]
|
||||||
},
|
},
|
||||||
|
|
||||||
"flex-layout.row#product-availability": {
|
"flex-layout.row#product-availability": {
|
||||||
|
@ -2,6 +2,9 @@
|
|||||||
"example-component": {
|
"example-component": {
|
||||||
"component": "Example"
|
"component": "Example"
|
||||||
},
|
},
|
||||||
|
"pix-component": {
|
||||||
|
"component": "Pix"
|
||||||
|
},
|
||||||
"html": {
|
"html": {
|
||||||
"component": "html",
|
"component": "html",
|
||||||
"composition": "children"
|
"composition": "children"
|
||||||
|
@ -59,7 +59,7 @@
|
|||||||
"background": {
|
"background": {
|
||||||
"base": "#ffffff",
|
"base": "#ffffff",
|
||||||
"base--inverted": "#03044e",
|
"base--inverted": "#03044e",
|
||||||
"action-primary": "#0F3E99",
|
"action-primary": "#000",
|
||||||
"action-secondary": "#eef3f7",
|
"action-secondary": "#eef3f7",
|
||||||
"emphasis": "#f71963",
|
"emphasis": "#f71963",
|
||||||
"disabled": "#f2f4f5",
|
"disabled": "#f2f4f5",
|
||||||
@ -76,7 +76,7 @@
|
|||||||
"muted-5": "#f2f4f5"
|
"muted-5": "#f2f4f5"
|
||||||
},
|
},
|
||||||
"hover-background": {
|
"hover-background": {
|
||||||
"action-primary": "#072c75",
|
"action-primary": "#292929",
|
||||||
"action-secondary": "#dbe9fd",
|
"action-secondary": "#dbe9fd",
|
||||||
"emphasis": "#dd1659",
|
"emphasis": "#dd1659",
|
||||||
"success": "#8bc34a",
|
"success": "#8bc34a",
|
||||||
@ -92,7 +92,7 @@
|
|||||||
"muted-5": "#f2f4f5"
|
"muted-5": "#f2f4f5"
|
||||||
},
|
},
|
||||||
"active-background": {
|
"active-background": {
|
||||||
"action-primary": "#0c389f",
|
"action-primary": "#000",
|
||||||
"action-secondary": "#d2defc",
|
"action-secondary": "#d2defc",
|
||||||
"emphasis": "#dd1659",
|
"emphasis": "#dd1659",
|
||||||
"success": "#8bc34a",
|
"success": "#8bc34a",
|
||||||
@ -108,7 +108,7 @@
|
|||||||
"muted-5": "#f2f4f5"
|
"muted-5": "#f2f4f5"
|
||||||
},
|
},
|
||||||
"text": {
|
"text": {
|
||||||
"action-primary": "#0F3E99",
|
"action-primary": "#000",
|
||||||
"action-secondary": "#eef3f7",
|
"action-secondary": "#eef3f7",
|
||||||
"link": "#0F3E99",
|
"link": "#0F3E99",
|
||||||
"emphasis": "#f71963",
|
"emphasis": "#f71963",
|
||||||
@ -151,7 +151,7 @@
|
|||||||
"warning--faded": "#fff6e0"
|
"warning--faded": "#fff6e0"
|
||||||
},
|
},
|
||||||
"border": {
|
"border": {
|
||||||
"action-primary": "#0F3E99",
|
"action-primary": "#000",
|
||||||
"action-secondary": "#eef3f7",
|
"action-secondary": "#eef3f7",
|
||||||
"emphasis": "#f71963",
|
"emphasis": "#f71963",
|
||||||
"disabled": "#e3e4e6",
|
"disabled": "#e3e4e6",
|
||||||
@ -242,7 +242,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"borderWidths": [0, 0.125, 0.25, 0.5, 1, 2],
|
"borderWidths": [0, 0.125, 0.25, 0.5, 1, 2],
|
||||||
"borderRadius": [0, 0.125, 0.25, 0.5, 1],
|
"borderRadius": [0, 0, 0, 0.5, 1],
|
||||||
"widths": [1, 2, 4, 8, 16],
|
"widths": [1, 2, 4, 8, 16],
|
||||||
"maxWidths": [1, 2, 4, 8, 16, 32, 48, 64, 96],
|
"maxWidths": [1, 2, 4, 8, 16, 32, 48, 64, 96],
|
||||||
"heights": [1, 2, 4, 8, 16],
|
"heights": [1, 2, 4, 8, 16],
|
||||||
@ -255,84 +255,84 @@
|
|||||||
"measure": [30, 34, 20],
|
"measure": [30, 34, 20],
|
||||||
"styles": {
|
"styles": {
|
||||||
"heading-1": {
|
"heading-1": {
|
||||||
"fontFamily": "San Francisco, -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, ubuntu, roboto, noto, segoe ui, arial, sans-serif",
|
"fontFamily": "'Open Sans', sans-serif",
|
||||||
"fontWeight": "700",
|
"fontWeight": "700",
|
||||||
"fontSize": "3rem",
|
"fontSize": "3rem",
|
||||||
"textTransform": "initial",
|
"textTransform": "initial",
|
||||||
"letterSpacing": "0"
|
"letterSpacing": "0"
|
||||||
},
|
},
|
||||||
"heading-2": {
|
"heading-2": {
|
||||||
"fontFamily": "San Francisco, -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, ubuntu, roboto, noto, segoe ui, arial, sans-serif",
|
"fontFamily": "'Open Sans', sans-serif",
|
||||||
"fontWeight": "700",
|
"fontWeight": "700",
|
||||||
"fontSize": "2.25rem",
|
"fontSize": "2.25rem",
|
||||||
"textTransform": "initial",
|
"textTransform": "initial",
|
||||||
"letterSpacing": "0"
|
"letterSpacing": "0"
|
||||||
},
|
},
|
||||||
"heading-3": {
|
"heading-3": {
|
||||||
"fontFamily": "San Francisco, -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, ubuntu, roboto, noto, segoe ui, arial, sans-serif",
|
"fontFamily": "'Open Sans', sans-serif",
|
||||||
"fontWeight": "700",
|
"fontWeight": "700",
|
||||||
"fontSize": "1.75rem",
|
"fontSize": "1.75rem",
|
||||||
"textTransform": "initial",
|
"textTransform": "initial",
|
||||||
"letterSpacing": "0"
|
"letterSpacing": "0"
|
||||||
},
|
},
|
||||||
"heading-4": {
|
"heading-4": {
|
||||||
"fontFamily": "San Francisco, -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, ubuntu, roboto, noto, segoe ui, arial, sans-serif",
|
"fontFamily": "'Open Sans', sans-serif",
|
||||||
"fontWeight": "normal",
|
"fontWeight": "normal",
|
||||||
"fontSize": "1.5rem",
|
"fontSize": "1.5rem",
|
||||||
"textTransform": "initial",
|
"textTransform": "initial",
|
||||||
"letterSpacing": "0"
|
"letterSpacing": "0"
|
||||||
},
|
},
|
||||||
"heading-5": {
|
"heading-5": {
|
||||||
"fontFamily": "San Francisco, -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, ubuntu, roboto, noto, segoe ui, arial, sans-serif",
|
"fontFamily": "'Open Sans', sans-serif",
|
||||||
"fontWeight": "normal",
|
"fontWeight": "normal",
|
||||||
"fontSize": "1.25rem",
|
"fontSize": "1.25rem",
|
||||||
"textTransform": "initial",
|
"textTransform": "initial",
|
||||||
"letterSpacing": "0"
|
"letterSpacing": "0"
|
||||||
},
|
},
|
||||||
"heading-6": {
|
"heading-6": {
|
||||||
"fontFamily": "San Francisco, -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, ubuntu, roboto, noto, segoe ui, arial, sans-serif",
|
"fontFamily": "'Open Sans', sans-serif",
|
||||||
"fontWeight": "normal",
|
"fontWeight": "normal",
|
||||||
"fontSize": "1.25rem",
|
"fontSize": "1.25rem",
|
||||||
"textTransform": "initial",
|
"textTransform": "initial",
|
||||||
"letterSpacing": "0"
|
"letterSpacing": "0"
|
||||||
},
|
},
|
||||||
"body": {
|
"body": {
|
||||||
"fontFamily": "San Francisco, -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, ubuntu, roboto, noto, segoe ui, arial, sans-serif",
|
"fontFamily": "'Open Sans', sans-serif",
|
||||||
"fontWeight": "normal",
|
"fontWeight": "normal",
|
||||||
"fontSize": "1rem",
|
"fontSize": "1rem",
|
||||||
"textTransform": "initial",
|
"textTransform": "initial",
|
||||||
"letterSpacing": "0"
|
"letterSpacing": "0"
|
||||||
},
|
},
|
||||||
"small": {
|
"small": {
|
||||||
"fontFamily": "San Francisco, -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, ubuntu, roboto, noto, segoe ui, arial, sans-serif",
|
"fontFamily": "'Open Sans', sans-serif",
|
||||||
"fontWeight": "normal",
|
"fontWeight": "normal",
|
||||||
"fontSize": "0.875rem",
|
"fontSize": "0.875rem",
|
||||||
"textTransform": "initial",
|
"textTransform": "initial",
|
||||||
"letterSpacing": "0"
|
"letterSpacing": "0"
|
||||||
},
|
},
|
||||||
"mini": {
|
"mini": {
|
||||||
"fontFamily": "San Francisco, -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, ubuntu, roboto, noto, segoe ui, arial, sans-serif",
|
"fontFamily": "'Open Sans', sans-serif",
|
||||||
"fontWeight": "normal",
|
"fontWeight": "normal",
|
||||||
"fontSize": "0.75rem",
|
"fontSize": "0.75rem",
|
||||||
"textTransform": "initial",
|
"textTransform": "initial",
|
||||||
"letterSpacing": "0"
|
"letterSpacing": "0"
|
||||||
},
|
},
|
||||||
"action": {
|
"action": {
|
||||||
"fontFamily": "San Francisco, -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, ubuntu, roboto, noto, segoe ui, arial, sans-serif",
|
"fontFamily": "'Open Sans', sans-serif",
|
||||||
"fontWeight": "500",
|
"fontWeight": "500",
|
||||||
"fontSize": "1rem",
|
"fontSize": "1rem",
|
||||||
"textTransform": "uppercase",
|
"textTransform": "uppercase",
|
||||||
"letterSpacing": "0"
|
"letterSpacing": "0"
|
||||||
},
|
},
|
||||||
"action--small": {
|
"action--small": {
|
||||||
"fontFamily": "San Francisco, -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, ubuntu, roboto, noto, segoe ui, arial, sans-serif",
|
"fontFamily": "'Open Sans', sans-serif",
|
||||||
"fontWeight": "500",
|
"fontWeight": "500",
|
||||||
"fontSize": "0.875rem",
|
"fontSize": "0.875rem",
|
||||||
"textTransform": "uppercase",
|
"textTransform": "uppercase",
|
||||||
"letterSpacing": "0"
|
"letterSpacing": "0"
|
||||||
},
|
},
|
||||||
"action--large": {
|
"action--large": {
|
||||||
"fontFamily": "San Francisco, -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, ubuntu, roboto, noto, segoe ui, arial, sans-serif",
|
"fontFamily": "'Open Sans', sans-serif",
|
||||||
"fontWeight": "500",
|
"fontWeight": "500",
|
||||||
"fontSize": "1.25rem",
|
"fontSize": "1.25rem",
|
||||||
"textTransform": "uppercase",
|
"textTransform": "uppercase",
|
||||||
|
15
styles/css/vtex.add-to-cart-button.css
Normal file
15
styles/css/vtex.add-to-cart-button.css
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
/*
|
||||||
|
0 - 600PX: Phone
|
||||||
|
600 - 900px: Table portrait
|
||||||
|
900 - 1200px: Tablet landscape
|
||||||
|
[1200 - 1800] is where our nortal styles apply
|
||||||
|
1800px + : Big desktop
|
||||||
|
*/
|
||||||
|
/* Media Query M3 */
|
||||||
|
@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;500;700&display=swap");
|
||||||
|
/* Grid breakpoints */
|
||||||
|
.buttonText--addToCartButton {
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 18px;
|
||||||
|
line-height: 25px;
|
||||||
|
}
|
@ -7,6 +7,7 @@
|
|||||||
1800px + : Big desktop
|
1800px + : Big desktop
|
||||||
*/
|
*/
|
||||||
/* Media Query M3 */
|
/* Media Query M3 */
|
||||||
|
@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;500;700&display=swap");
|
||||||
/* Grid breakpoints */
|
/* Grid breakpoints */
|
||||||
.container {
|
.container {
|
||||||
padding: 0 40px;
|
padding: 0 40px;
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
1800px + : Big desktop
|
1800px + : Big desktop
|
||||||
*/
|
*/
|
||||||
/* Media Query M3 */
|
/* Media Query M3 */
|
||||||
|
@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;500;700&display=swap");
|
||||||
/* Grid breakpoints */
|
/* Grid breakpoints */
|
||||||
.flexRow .flexRowContent--productPanel {
|
.flexRow .flexRowContent--productPanel {
|
||||||
margin: 16px 0 0;
|
margin: 16px 0 0;
|
||||||
@ -14,7 +15,17 @@
|
|||||||
}
|
}
|
||||||
.flexRow .flexRowContent--productPanel .stretchChildrenWidth:first-child {
|
.flexRow .flexRowContent--productPanel .stretchChildrenWidth:first-child {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
justify-content: normal;
|
||||||
}
|
}
|
||||||
.flexRow .flexRowContent--productPanel .stretchChildrenWidth:first-child .flexCol--productShowcase {
|
.flexRow .flexRowContent--productPanel .flexCol--productShowcase {
|
||||||
margin: 0 32px 0 0;
|
padding: 0 32px 0 0;
|
||||||
|
}
|
||||||
|
.flexRow .flexRowContent--quantityAndBuy {
|
||||||
|
margin: 0 0 16px;
|
||||||
|
}
|
||||||
|
.flexRow .flexRowContent--quantityAndBuy .stretchChildrenWidth {
|
||||||
|
width: auto !important;
|
||||||
|
}
|
||||||
|
.flexRow .flexRowContent--quantityAndBuy .stretchChildrenWidth:last-child {
|
||||||
|
flex: 1;
|
||||||
}
|
}
|
@ -6,10 +6,11 @@
|
|||||||
1800px + : Big desktop
|
1800px + : Big desktop
|
||||||
*/
|
*/
|
||||||
/* Media Query M3 */
|
/* Media Query M3 */
|
||||||
|
@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;500;700&display=swap");
|
||||||
/* Grid breakpoints */
|
/* Grid breakpoints */
|
||||||
.product-identifier {
|
.product-identifier {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 65px;
|
top: 35px;
|
||||||
right: 40px;
|
right: 40px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
|
@ -6,4 +6,36 @@
|
|||||||
1800px + : Big desktop
|
1800px + : Big desktop
|
||||||
*/
|
*/
|
||||||
/* Media Query M3 */
|
/* Media Query M3 */
|
||||||
|
@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;500;700&display=swap");
|
||||||
/* Grid breakpoints */
|
/* Grid breakpoints */
|
||||||
|
.sellingPrice--hasListPrice {
|
||||||
|
font-weight: 700;
|
||||||
|
font-size: 25px;
|
||||||
|
line-height: 38px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.installments--sellingInfo {
|
||||||
|
font-size: 0;
|
||||||
|
}
|
||||||
|
.installments--sellingInfo .installmentsNumber,
|
||||||
|
.installments--sellingInfo .installmentValue {
|
||||||
|
font-weight: 700;
|
||||||
|
font-size: 16px;
|
||||||
|
line-height: 22px;
|
||||||
|
color: #929292;
|
||||||
|
}
|
||||||
|
.installments--sellingInfo .installmentsNumber::after {
|
||||||
|
content: " x ";
|
||||||
|
font-weight: 700;
|
||||||
|
font-size: 16px;
|
||||||
|
line-height: 22px;
|
||||||
|
}
|
||||||
|
.installments--sellingInfo .installmentValue::before, .installments--sellingInfo .installmentValue::after {
|
||||||
|
content: "de ";
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 16px;
|
||||||
|
line-height: 22px;
|
||||||
|
}
|
||||||
|
.installments--sellingInfo .installmentValue::after {
|
||||||
|
content: " sem juros";
|
||||||
|
}
|
@ -6,11 +6,8 @@
|
|||||||
1800px + : Big desktop
|
1800px + : Big desktop
|
||||||
*/
|
*/
|
||||||
/* Media Query M3 */
|
/* Media Query M3 */
|
||||||
|
@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;500;700&display=swap");
|
||||||
/* Grid breakpoints */
|
/* Grid breakpoints */
|
||||||
.html {
|
.quantitySelectorContainer {
|
||||||
background-color: red;
|
margin: 0 10px 0 0;
|
||||||
}
|
|
||||||
|
|
||||||
.html--pdp-breadcrumb {
|
|
||||||
background-color: blue;
|
|
||||||
}
|
}
|
@ -6,4 +6,5 @@
|
|||||||
1800px + : Big desktop
|
1800px + : Big desktop
|
||||||
*/
|
*/
|
||||||
/* Media Query M3 */
|
/* Media Query M3 */
|
||||||
|
@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;500;700&display=swap");
|
||||||
/* Grid breakpoints */
|
/* Grid breakpoints */
|
@ -6,6 +6,7 @@
|
|||||||
1800px + : Big desktop
|
1800px + : Big desktop
|
||||||
*/
|
*/
|
||||||
/* Media Query M3 */
|
/* Media Query M3 */
|
||||||
|
@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;500;700&display=swap");
|
||||||
/* Grid breakpoints */
|
/* Grid breakpoints */
|
||||||
.relatedProducts {
|
.relatedProducts {
|
||||||
padding: 0 40px;
|
padding: 0 40px;
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
1800px + : Big desktop
|
1800px + : Big desktop
|
||||||
*/
|
*/
|
||||||
/* Media Query M3 */
|
/* Media Query M3 */
|
||||||
|
@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;500;700&display=swap");
|
||||||
/* Grid breakpoints */
|
/* Grid breakpoints */
|
||||||
.container {
|
.container {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
@ -39,9 +40,69 @@
|
|||||||
}
|
}
|
||||||
.container .productNameContainer {
|
.container .productNameContainer {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
|
margin: 0 0 51px;
|
||||||
|
}
|
||||||
|
.container .productNameContainer .productBrand--quickview {
|
||||||
font-weight: 300;
|
font-weight: 300;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
line-height: 34px;
|
line-height: 34px;
|
||||||
color: #575757;
|
color: #575757;
|
||||||
margin: 0 0 51px;
|
}
|
||||||
|
.container .skuSelectorContainer {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column-reverse;
|
||||||
|
}
|
||||||
|
.container .skuSelectorContainer .skuSelectorSubcontainer {
|
||||||
|
margin: 0;
|
||||||
|
margin: 16px 0 10px;
|
||||||
|
}
|
||||||
|
.container .skuSelectorContainer .skuSelectorSubcontainer .skuSelectorTextContainer {
|
||||||
|
margin: 0 0 8px 0;
|
||||||
|
}
|
||||||
|
.container .skuSelectorContainer .skuSelectorSubcontainer .skuSelectorTextContainer .skuSelectorName {
|
||||||
|
font-size: 0;
|
||||||
|
}
|
||||||
|
.container .skuSelectorContainer .skuSelectorSubcontainer .skuSelectorTextContainer .skuSelectorName::before {
|
||||||
|
content: "OUTROS TAMANHOS:";
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 19px;
|
||||||
|
color: #929292;
|
||||||
|
}
|
||||||
|
.container .skuSelectorContainer .skuSelectorSubcontainer .skuSelectorOptionsList {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
.container .skuSelectorContainer .skuSelectorSubcontainer .skuSelectorOptionsList .skuSelectorItem {
|
||||||
|
margin: 0 16px 0 0;
|
||||||
|
}
|
||||||
|
.container .skuSelectorContainer .skuSelectorSubcontainer .skuSelectorOptionsList .skuSelectorItem .frameAround {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.container .skuSelectorContainer .skuSelectorSubcontainer .skuSelectorOptionsList .skuSelectorItem .skuSelectorInternalBox {
|
||||||
|
width: 40px;
|
||||||
|
height: 40px;
|
||||||
|
border-radius: 50%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
border: 1px solid #989898;
|
||||||
|
}
|
||||||
|
.container .skuSelectorContainer .skuSelectorSubcontainer .skuSelectorOptionsList .skuSelectorItem--selected .skuSelectorInternalBox {
|
||||||
|
border: 2px solid #000;
|
||||||
|
}
|
||||||
|
.container .skuSelectorContainer .skuSelectorSubcontainer .skuSelectorNameContainer {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
.container .skuSelectorContainer .skuSelectorSubcontainer:first-child {
|
||||||
|
margin: 0 0 16px;
|
||||||
|
}
|
||||||
|
.container .skuSelectorContainer .skuSelectorSubcontainer:first-child .skuSelectorTextContainer .skuSelectorName::before {
|
||||||
|
content: "OUTRAS CORES:";
|
||||||
|
}
|
||||||
|
.container .skuSelectorContainer .skuSelectorSubcontainer:first-child .skuSelectorTextContainer .skuSelectorSelectorImageValue,
|
||||||
|
.container .skuSelectorContainer .skuSelectorSubcontainer:first-child .skuSelectorTextContainer .skuSelectorNameSeparator {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.container .skuSelectorContainer .skuSelectorSubcontainer:first-child .skuSelectorOptionsList {
|
||||||
|
margin: 0;
|
||||||
}
|
}
|
15
styles/css/vtex.styleguide.css
Normal file
15
styles/css/vtex.styleguide.css
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
/*
|
||||||
|
0 - 600PX: Phone
|
||||||
|
600 - 900px: Table portrait
|
||||||
|
900 - 1200px: Tablet landscape
|
||||||
|
[1200 - 1800] is where our nortal styles apply
|
||||||
|
1800px + : Big desktop
|
||||||
|
*/
|
||||||
|
/* Media Query M3 */
|
||||||
|
@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;500;700&display=swap");
|
||||||
|
/* Grid breakpoints */
|
||||||
|
.hideDecorators {
|
||||||
|
border-left: none;
|
||||||
|
border-right: none;
|
||||||
|
color: #929292;
|
||||||
|
}
|
5
styles/sass/pages/product/vtex.add-to-cart-button.scss
Normal file
5
styles/sass/pages/product/vtex.add-to-cart-button.scss
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
.buttonText--addToCartButton {
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 18px;
|
||||||
|
line-height: 25px;
|
||||||
|
}
|
@ -6,9 +6,22 @@
|
|||||||
|
|
||||||
.stretchChildrenWidth:first-child {
|
.stretchChildrenWidth:first-child {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
justify-content: normal;
|
||||||
|
}
|
||||||
|
|
||||||
.flexCol--productShowcase {
|
.flexCol--productShowcase {
|
||||||
margin: 0 32px 0 0;
|
padding: 0 32px 0 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.flexRowContent--quantityAndBuy {
|
||||||
|
margin: 0 0 16px;
|
||||||
|
|
||||||
|
.stretchChildrenWidth {
|
||||||
|
width: auto !important;
|
||||||
|
|
||||||
|
&:last-child {
|
||||||
|
flex: 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
.product-identifier {
|
.product-identifier {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 65px;
|
top: calc(27px + 8px);
|
||||||
right: 40px;
|
right: 40px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
|
38
styles/sass/pages/product/vtex.product-price.scss
Normal file
38
styles/sass/pages/product/vtex.product-price.scss
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
.sellingPrice--hasListPrice {
|
||||||
|
font-weight: 700;
|
||||||
|
font-size: 25px;
|
||||||
|
line-height: 38px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.installments--sellingInfo {
|
||||||
|
font-size: 0;
|
||||||
|
|
||||||
|
.installmentsNumber,
|
||||||
|
.installmentValue {
|
||||||
|
font-weight: 700;
|
||||||
|
font-size: 16px;
|
||||||
|
line-height: 22px;
|
||||||
|
color: $color-gray6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.installmentsNumber::after {
|
||||||
|
content: " x ";
|
||||||
|
font-weight: 700;
|
||||||
|
font-size: 16px;
|
||||||
|
line-height: 22px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.installmentValue {
|
||||||
|
&::before,
|
||||||
|
&::after {
|
||||||
|
content: "de ";
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 16px;
|
||||||
|
line-height: 22px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&::after {
|
||||||
|
content: " sem juros";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
3
styles/sass/pages/product/vtex.product-quantity.scss
Normal file
3
styles/sass/pages/product/vtex.product-quantity.scss
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
.quantitySelectorContainer {
|
||||||
|
margin: 0 10px 0 0;
|
||||||
|
}
|
@ -36,10 +36,86 @@
|
|||||||
|
|
||||||
.productNameContainer {
|
.productNameContainer {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
font-weight: 300;
|
|
||||||
font-size: 20px;
|
|
||||||
line-height: 34px;
|
|
||||||
color: $color-gray7;
|
|
||||||
margin: 0 0 51px;
|
margin: 0 0 51px;
|
||||||
|
|
||||||
|
.productBrand--quickview {
|
||||||
|
font-weight: 300;
|
||||||
|
font-size: 20px;
|
||||||
|
line-height: 34px;
|
||||||
|
color: $color-gray7;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.skuSelectorContainer {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column-reverse;
|
||||||
|
|
||||||
|
.skuSelectorSubcontainer {
|
||||||
|
margin: 0;
|
||||||
|
margin: 16px 0 10px;
|
||||||
|
.skuSelectorTextContainer {
|
||||||
|
margin: 0 0 8px 0;
|
||||||
|
|
||||||
|
.skuSelectorName {
|
||||||
|
font-size: 0;
|
||||||
|
|
||||||
|
&::before {
|
||||||
|
content: "OUTROS TAMANHOS:";
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 19px;
|
||||||
|
color: $color-gray6;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.skuSelectorOptionsList {
|
||||||
|
margin: 0;
|
||||||
|
|
||||||
|
.skuSelectorItem {
|
||||||
|
margin: 0 16px 0 0;
|
||||||
|
|
||||||
|
.frameAround {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.skuSelectorInternalBox {
|
||||||
|
width: 40px;
|
||||||
|
height: 40px;
|
||||||
|
border-radius: 50%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
border: 1px solid $color-gray9;
|
||||||
|
}
|
||||||
|
|
||||||
|
&--selected .skuSelectorInternalBox {
|
||||||
|
border: 2px solid $color-black2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.skuSelectorNameContainer {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:first-child {
|
||||||
|
margin: 0 0 16px;
|
||||||
|
|
||||||
|
.skuSelectorTextContainer {
|
||||||
|
.skuSelectorName::before {
|
||||||
|
content: "OUTRAS CORES:";
|
||||||
|
}
|
||||||
|
|
||||||
|
.skuSelectorSelectorImageValue,
|
||||||
|
.skuSelectorNameSeparator {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.skuSelectorOptionsList {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
5
styles/sass/pages/product/vtex.styleguide.scss
Normal file
5
styles/sass/pages/product/vtex.styleguide.scss
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
.hideDecorators {
|
||||||
|
border-left: none;
|
||||||
|
border-right: none;
|
||||||
|
color: $color-gray6;
|
||||||
|
}
|
@ -1,4 +1,7 @@
|
|||||||
|
@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;500;700&display=swap");
|
||||||
|
|
||||||
$color-black: #292929;
|
$color-black: #292929;
|
||||||
|
$color-black2: #000;
|
||||||
|
|
||||||
$color-white: #fff;
|
$color-white: #fff;
|
||||||
|
|
||||||
@ -10,6 +13,7 @@ $color-gray5: #e5e5e5;
|
|||||||
$color-gray6: #929292;
|
$color-gray6: #929292;
|
||||||
$color-gray7: #575757;
|
$color-gray7: #575757;
|
||||||
$color-gray8: #9292927a;
|
$color-gray8: #9292927a;
|
||||||
|
$color-gray9: #989898;
|
||||||
|
|
||||||
$color-blue: #4267b2;
|
$color-blue: #4267b2;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user