@turnkey/react-wallet-kit
Version:
The easiest and most powerful way to integrate Turnkey's Embedded Wallets into your React applications.
34 lines (30 loc) • 882 B
JavaScript
;
var jsxRuntime = require('react/jsx-runtime');
var Buttons = require('../../design/Buttons.js');
var react = require('react');
function WalletAuthButton(props) {
const {
onContinue
} = props;
const [isLoading, setIsLoading] = react.useState(false);
const handleContinue = async () => {
setIsLoading(true);
try {
await Promise.resolve(onContinue());
} finally {
setIsLoading(false);
}
};
return jsxRuntime.jsx("div", {
className: "flex flex-col w-full",
children: jsxRuntime.jsx(Buttons.ActionButton, {
name: "wallet-auth-button",
onClick: handleContinue,
loading: isLoading,
className: "w-full text-inherit bg-button-light dark:bg-button-dark",
children: "Continue with wallet"
})
});
}
exports.WalletAuthButton = WalletAuthButton;
//# sourceMappingURL=WalletAuthButton.js.map