@coin-voyage/paykit
Version:
Seamless crypto payments. Onboard users from any chain, any coin into your app with one click.
9 lines (8 loc) • 957 B
JavaScript
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { motion } from "framer-motion";
import { AnimatePresence } from "framer-motion";
import { ErrorMessage } from "./styles";
const CloseIcon = (props) => (_jsx(motion.svg, { width: 14, height: 14, viewBox: "0 0 14 14", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, children: _jsx("path", { d: "M1 13L13 1M1 1L13 13", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" }) }));
export function ModalErrorBanner({ errorMessage, onDismiss }) {
return (_jsx(AnimatePresence, { children: errorMessage && (_jsxs(ErrorMessage, { initial: { y: "10%", x: "-50%" }, animate: { y: "-100%" }, exit: { y: "100%" }, transition: { duration: 0.2, ease: "easeInOut" }, children: [_jsx("span", { children: errorMessage }), _jsx("div", { onClick: onDismiss, style: { position: "absolute", right: 24, top: 24, cursor: "pointer" }, children: _jsx(CloseIcon, {}) })] })) }));
}