diff --git a/.eslintignore b/.eslintignore
new file mode 100644
index 0000000..f3dbc7f
--- /dev/null
+++ b/.eslintignore
@@ -0,0 +1,3 @@
+node_modules/
+coverage/
+*.snap.ts
\ No newline at end of file
diff --git a/.eslintrc b/.eslintrc
new file mode 100644
index 0000000..9713dfd
--- /dev/null
+++ b/.eslintrc
@@ -0,0 +1,7 @@
+{
+ "extends": "vtex",
+ "root": true,
+ "env": {
+ "node": true
+ }
+}
\ No newline at end of file
diff --git a/.prettierrc b/.prettierrc
new file mode 100644
index 0000000..320bc0c
--- /dev/null
+++ b/.prettierrc
@@ -0,0 +1 @@
+"@vtex/prettier-config"
\ No newline at end of file
diff --git a/package.json b/package.json
index 4b65062..e87e00e 100644
--- a/package.json
+++ b/package.json
@@ -1,20 +1,27 @@
{
+ "name": "store-theme",
+ "private": true,
"license": "UNLICENSED",
- "main": "gulpfile.js",
- "directories": {
- "doc": "docs"
- },
"scripts": {
- "dev": "concurrently \"vtex unlink --all && vtex link\" \"gulp storefront\"",
"lint": "eslint ./ --fix",
+ "format": "prettier --write \"**/*.{ts,tsx,js,jsx,json}\"",
+ "dev": "concurrently \"vtex unlink --all && vtex link\" \"gulp storefront\"",
"scss": "gulp storefront"
},
- "repository": {
- "type": "git",
- "url": "git@gitlab.com:agenciam3/pattern/vtex-io-template.git"
+ "husky": {
+ "hooks": {
+ "pre-commit": "lint-staged"
+ }
+ },
+ "lint-staged": {
+ "*.{ts,js,tsx,jsx}": [
+ "eslint --fix",
+ "prettier --write"
+ ],
+ "*.{json,graphql,gql}": [
+ "prettier --write"
+ ]
},
- "keywords": [],
- "author": "",
"devDependencies": {
"eslint": "^7.22.0",
"eslint-config-prettier": "^8.1.0",
@@ -37,8 +44,18 @@
"prettier": "2.0.2",
"typescript": "3.8.3"
},
+ "main": "gulpfile.js",
+ "directories": {
+ "doc": "docs"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git@gitlab.com:agenciam3/pattern/vtex-io-template.git"
+ },
+ "keywords": [],
+ "author": "",
"dependencies": {
"husky": "^5.2.0",
"react": "^17.0.2"
}
-}
+}
\ No newline at end of file
diff --git a/react/components/Example/Example.tsx b/react/components/Example/Example.tsx
index d195271..c5f172b 100644
--- a/react/components/Example/Example.tsx
+++ b/react/components/Example/Example.tsx
@@ -1,9 +1,20 @@
import React from 'react'
+import './pix.css'
+import { useProduct } from 'vtex.product-context'
const Example = () => {
+ const productContext = useProduct()
+
+ console.log('productContext', productContext)
+
return (
-
Example
+
+
+
)
}
-export default Example
\ No newline at end of file
+export default Example
diff --git a/react/components/Example/pix.css b/react/components/Example/pix.css
new file mode 100644
index 0000000..f940421
--- /dev/null
+++ b/react/components/Example/pix.css
@@ -0,0 +1,3 @@
+[class*="pix-container"] {
+ margin: 8px 0 16px 0;
+}
diff --git a/react/tsconfig.json b/react/tsconfig.json
index a26a540..9ac901b 100644
--- a/react/tsconfig.json
+++ b/react/tsconfig.json
@@ -2,10 +2,16 @@
"extends": "@vtex/tsconfig",
"compilerOptions": {
"noEmitOnError": false,
- "lib": ["dom"],
+ "lib": [
+ "dom"
+ ],
"module": "esnext",
"moduleResolution": "node",
"target": "es2017"
},
- "include": ["./typings/*.d.ts", "./**/*.tsx", "./**/*.ts"]
+ "include": [
+ "./typings/*.d.ts",
+ "./**/*.tsx",
+ "./**/*.ts"
+ ]
}
\ No newline at end of file
diff --git a/store/blocks/pdp/product.jsonc b/store/blocks/pdp/product.jsonc
index d18b7da..5e53735 100644
--- a/store/blocks/pdp/product.jsonc
+++ b/store/blocks/pdp/product.jsonc
@@ -109,13 +109,14 @@
"flex-layout.row#list-price-savings",
"flex-layout.row#selling-price",
"product-installments",
+ "example-component",
// "product-separator",
"product-identifier.product",
"sku-selector",
"html#quantity-wrapper",
// "product-quantity",
"product-assembly-options",
- "product-gifts",
+ // "product-gifts",
// "flex-layout.row#buy-button",
"availability-subscriber",
"shipping-simulator",
@@ -129,7 +130,15 @@
"testId": "quantity",
"blockClass": "quantity-wrapper"
},
- "children": ["product-quantity", "html#buy-button"]
+ "children": ["html#product-quantity", "html#buy-button"]
+ },
+
+ "html#product-quantity": {
+ "props": {
+ "testId": "product-quantity",
+ "blockClass": "quantidade"
+ },
+ "children": ["product-quantity"]
},
"html#buy-button": {
diff --git a/styles/css/vtex.breadcrumb.css b/styles/css/vtex.breadcrumb.css
index 683cfb5..17bb0f0 100644
--- a/styles/css/vtex.breadcrumb.css
+++ b/styles/css/vtex.breadcrumb.css
@@ -18,6 +18,19 @@
.container .homeLink .homeIcon {
display: none;
}
+.container .arrow {
+ position: relative;
+}
+.container .arrow .link--1,
+.container .arrow .link--2 {
+ position: absolute;
+ top: -7px;
+ width: 57px;
+}
+.container .arrow .link--1:focus,
+.container .arrow .link--2:focus {
+ color: transparent;
+}
.container .arrow--1,
.container .arrow--2 {
font-size: 0;
@@ -28,9 +41,11 @@
}
.container .arrow--1::after {
content: "Sapatos";
+ padding-left: 8px;
}
.container .arrow--2::after {
content: "Sandálias";
+ padding-left: 8px;
}
.container .homeLink::before,
.container .arrow--1::after,
diff --git a/styles/css/vtex.store-components.css b/styles/css/vtex.store-components.css
index a0ebfbe..f29b7d5 100644
--- a/styles/css/vtex.store-components.css
+++ b/styles/css/vtex.store-components.css
@@ -20,9 +20,15 @@
.container .carouselGaleryCursor {
width: 664px;
}
+.container .carouselGaleryThumbs {
+ margin-top: 16px;
+}
.container .productImageTag {
object-fit: fill !important;
}
+.container .thumbImg {
+ border-radius: 8px;
+}
.container .productNameContainer {
text-align: right;
font-weight: 300;
@@ -98,6 +104,9 @@
line-height: 19px;
color: rgba(185, 185, 185, 0.6);
}
+.container .skuSelectorOptionsList {
+ margin: 0;
+}
.container .diagonalCross {
transform: rotate(90deg);
}
\ No newline at end of file
diff --git a/styles/sass/pages/product/vtex.breadcrumb.scss b/styles/sass/pages/product/vtex.breadcrumb.scss
index 8227a51..c86c701 100644
--- a/styles/sass/pages/product/vtex.breadcrumb.scss
+++ b/styles/sass/pages/product/vtex.breadcrumb.scss
@@ -2,7 +2,7 @@
padding: 0 0 16px 40px;
.homeLink {
&::before {
- content: "Home";
+ content: 'Home';
}
.homeIcon {
@@ -10,6 +10,21 @@
}
}
+ .arrow {
+ position: relative;
+
+ .link--1,
+ .link--2 {
+ position: absolute;
+ top: -7px;
+ width: 57px;
+
+ &:focus {
+ color: transparent;
+ }
+ }
+ }
+
.arrow--1,
.arrow--2 {
font-size: 0;
@@ -20,11 +35,13 @@
}
.arrow--1::after {
- content: "Sapatos";
+ content: 'Sapatos';
+ padding-left: 8px;
}
.arrow--2::after {
- content: "Sandálias";
+ content: 'Sandálias';
+ padding-left: 8px;
}
.homeLink::before,
diff --git a/styles/sass/pages/product/vtex.store-components.scss b/styles/sass/pages/product/vtex.store-components.scss
index 9e3b748..dd72024 100644
--- a/styles/sass/pages/product/vtex.store-components.scss
+++ b/styles/sass/pages/product/vtex.store-components.scss
@@ -16,10 +16,18 @@
width: 664px;
}
+ .carouselGaleryThumbs {
+ margin-top: 16px;
+ }
+
.productImageTag {
object-fit: fill !important;
}
+ .thumbImg {
+ border-radius: 8px;
+ }
+
.productNameContainer {
text-align: right;
font-weight: 300;
@@ -46,7 +54,7 @@
&:last-child {
&::before {
- content: "OUTROS TAMANHOS:";
+ content: 'OUTROS TAMANHOS:';
font-weight: 400;
font-size: 14px;
line-height: 19px;
@@ -55,7 +63,7 @@
}
&::before {
- content: "OUTRAS CORES";
+ content: 'OUTRAS CORES';
font-weight: 400;
font-size: 14px;
line-height: 19px;
@@ -113,6 +121,10 @@
color: rgba(185, 185, 185, 0.6);
}
+ .skuSelectorOptionsList {
+ margin: 0;
+ }
+
.diagonalCross {
transform: rotate(90deg);
}