UNPKG

react-donation-section

Version:

A reusable React component for donation sections with multiple variants

16 lines (13 loc) 1.42 kB
import { jsx, jsxs } from 'react/jsx-runtime'; var DonationSection = function (_a) { var _b = _a.title, title = _b === void 0 ? "¿Te gustó la app? Invítame un café" : _b, _c = _a.buttonText, buttonText = _c === void 0 ? "Invitar un cafecito" : _c, _d = _a.buttonUrl, buttonUrl = _d === void 0 ? "https://cafecito.app/nachthelad" : _d, _e = _a.buttonIcon, buttonIcon = _e === void 0 ? "☕" : _e, _f = _a.className, className = _f === void 0 ? "" : _f, _g = _a.variant, variant = _g === void 0 ? "default" : _g; var baseClasses = "mt-6 text-center"; var variantClasses = { default: "bg-gray-50 rounded-xl p-4 border border-gray-200", minimal: "bg-transparent p-2", card: "bg-white rounded-lg p-6 shadow-md border border-gray-100", }; return (jsx("div", { className: "".concat(baseClasses, " ").concat(className), children: jsxs("div", { className: variantClasses[variant], children: [jsx("p", { className: "text-gray-600 text-sm mb-3", children: title }), jsxs("a", { href: buttonUrl, target: "_blank", rel: "noopener noreferrer", className: "inline-flex items-center px-4 py-2 bg-amber-500 text-white font-medium rounded-lg hover:bg-amber-600 transition-colors duration-200", children: [jsx("span", { className: "mr-2", children: buttonIcon }), buttonText] })] }) })); }; export { DonationSection, DonationSection as default }; //# sourceMappingURL=index.esm.js.map