@turnkey/react-wallet-kit
Version:
The easiest and most powerful way to integrate Turnkey's Embedded Wallets into your React applications.
35 lines (32 loc) • 1.52 kB
JavaScript
import { jsxs, jsx } from 'react/jsx-runtime';
function DeveloperError(props) {
var _props$developerTitle = props.developerTitle,
developerTitle = _props$developerTitle === void 0 ? "Developer Error" : _props$developerTitle,
developerMessages = props.developerMessages,
userTitle = props.userTitle,
userMessages = props.userMessages;
var isDev = process.env.NODE_ENV === "development";
return jsxs("div", {
className: "flex flex-col justify-center items-center mt-10 text-sm min-w-80 max-w-full min-48 font-normal text-center text-icon-text-light dark:text-icon-text-dark",
children: [jsx("strong", {
className: "text-danger-light dark:text-danger-dark text-lg",
children: isDev ? developerTitle : userTitle
}), isDev ? developerMessages === null || developerMessages === void 0 ? void 0 : developerMessages.map(function (msg, index) {
return jsxs("div", {
className: "w-full",
children: [jsx("div", {
className: "w-full h-[1px] bg-icon-background-light dark:bg-icon-background-dark my-4"
}), msg]
}, index);
}) : userMessages === null || userMessages === void 0 ? void 0 : userMessages.map(function (msg, index) {
return jsx("div", {
children: msg
}, index);
}), isDev && jsx("div", {
className: "text-xs mt-10 font-extralight italic",
children: "You will only see this error if you are a developer!"
})]
});
}
export { DeveloperError };
//# sourceMappingURL=Failure.mjs.map