fm-lp-factory
Version:
package created to build web ui components for FidelizarMais LP services
36 lines (35 loc) • 1.43 kB
JavaScript
import bannerWithCards from "./bannerWithCards.js";
import bannerWithCardsNude from "./bannerWithCardsNude.js";
import floatingCard from "./floatingCard.js";
import stepsWithLeftImage from "./stepsWithLeftImage.js";
import stepsWithRightImage from "./stepsWithRightImage.js";
import textWithCardsLeftAndImageRight from "./textWithCardsLeftAndImageRight.js";
import textWithCardsRightAndImageLeft from "./textWithCardsRightAndImageLeft.js";
export default (component) => {
switch (component.type) {
case "floating-card-with-steps":
floatingCard(component.data);
break;
case "text-with-cards-left-and-image-right":
textWithCardsLeftAndImageRight(component.data);
break;
case "text-with-cards-right-and-image-left":
textWithCardsRightAndImageLeft(component.data);
break;
case "banner-with-cards":
bannerWithCards(component.data);
break;
case "banner-with-cards-nude":
bannerWithCardsNude(component.data);
break;
case "steps-with-left-image":
stepsWithLeftImage(component.data);
break;
case "steps-with-right-image":
stepsWithRightImage(component.data);
break;
default:
console.error("Component type not found", component);
break;
}
}