UNPKG

kupos-service-item-package

Version:

A reusable service item component

19 lines (18 loc) 1.42 kB
import React from "react"; const PopupComponent = ({ isVisible, body, primaryButtonText = "CONTINUAR", secondaryButtonText, onPrimaryButtonClick, onSecondaryButtonClick, onClose, }) => { if (!isVisible) return null; return (React.createElement("div", { className: "fixed inset-0 flex items-center justify-center z-50" }, React.createElement("div", { className: "fixed inset-0 bg-black bg-opacity-50", onClick: onClose }), React.createElement("div", { className: "bg-white rounded-lg p-8 max-w-md mx-auto z-10 relative shadow-service" }, React.createElement("div", { className: "text-center text-gray-700 mb-6 text-lg" }, body), React.createElement("button", { className: "w-full py-4 px-6 bg-[#ff8f45] text-white rounded-md text-lg font-medium mb-3 hover:bg-[#e67e35] transition-colors", onClick: () => { onPrimaryButtonClick && onPrimaryButtonClick(); onClose && onClose(); } }, primaryButtonText), secondaryButtonText && (React.createElement("button", { className: "w-full py-4 px-6 bg-[#FFF2F2] text-[#ff8f45] rounded-md text-lg font-medium hover:bg-[#FFE5E5] transition-colors", onClick: () => { onSecondaryButtonClick && onSecondaryButtonClick(); onClose && onClose(); } }, secondaryButtonText))))); }; export default PopupComponent;