@daimo/pay
Version:
Seamless crypto payments. Onboard users from any chain, any coin into your app with one click.
38 lines (35 loc) • 1.36 kB
JavaScript
import { jsx } from 'react/jsx-runtime';
import { AnimatePresence } from 'framer-motion';
import CircleSpinner from '../CircleSpinner/index.js';
import SquircleSpinner from '../SquircleSpinner/index.js';
import { LoadingContainer, AnimationContainer } from '../styles.js';
const WalletPaymentSpinner = ({
logo,
logoShape
}) => {
const optionSpinner = (() => {
if (typeof logo === "string") {
if (logoShape === "circle") {
return /* @__PURE__ */ jsx(
CircleSpinner,
{
logo: /* @__PURE__ */ jsx("img", { src: logo }),
loading: false,
unavailable: false
}
);
} else {
return /* @__PURE__ */ jsx(SquircleSpinner, { logo: /* @__PURE__ */ jsx("img", { src: logo }), loading: false });
}
} else {
if (logoShape === "circle") {
return /* @__PURE__ */ jsx(CircleSpinner, { logo, loading: false, unavailable: false });
} else {
return /* @__PURE__ */ jsx(SquircleSpinner, { logo, loading: false });
}
}
})();
return /* @__PURE__ */ jsx(LoadingContainer, { children: /* @__PURE__ */ jsx(AnimationContainer, { $circle: logoShape === "circle", children: /* @__PURE__ */ jsx(AnimatePresence, { children: optionSpinner }) }) });
};
export { WalletPaymentSpinner as default };
//# sourceMappingURL=index.js.map