refactor(swiper): removendo SwiperComponent , substituindo por recurso da vtex

This commit is contained in:
Ana Carolina Duarte Cavalcante 2023-01-23 17:43:53 -03:00
parent 9125d0a842
commit 9b6bb76be9
4 changed files with 2 additions and 29 deletions

View File

@ -1,3 +0,0 @@
import Swiper from "./components/SwiperComponent/SwiperComponent";
export default Swiper;

View File

@ -1,21 +0,0 @@
const Swiper = () => {
if (typeof document !== "undefined") {
const SwiperContainer = document.querySelector(".swiper-container");
const SwiperWrapper = document.querySelector(".swiper-wrapper");
if (SwiperContainer) {
SwiperContainer.classList.remove("swiper-container-vertical");
SwiperContainer.classList.add("swiper-container-horizontal");
SwiperContainer.classList.add(
"vtex-store-components-3-x-swiper-component"
);
}
if (SwiperWrapper) {
SwiperWrapper.classList.add(
"vtex-store-components-3-x-swiper-wrapper-style"
);
}
}
return null;
};
export default Swiper;

View File

@ -3,7 +3,6 @@
"children": [
"html#breadcrumb",
"condition-layout.product#availability",
"swiper-component",
"flex-layout.row#description",
"flex-layout.row#specifications-title",
"product-specification-group#table",
@ -92,7 +91,8 @@
"phone": "16:9"
},
"displayThumbnailsArrows": false,
"showPaginationDots": false
"showPaginationDots": false,
"thumbnailsOrientation": "horizontal"
}
},
"flex-layout.col#right-col": {

View File

@ -5,8 +5,5 @@
"html": {
"component": "html",
"composition": "children"
},
"swiper-component": {
"component": "SwiperComponent"
}
}