UNPKG

@web3auth/modal

Version:

Multi chain wallet aggregator for web3Auth

59 lines (55 loc) 1.44 kB
'use strict'; var jsxRuntime = require('react/jsx-runtime'); var Button_type = require('./Button.type.js'); var ButtonSocial = require('./ButtonSocial/ButtonSocial.js'); var ButtonWallet = require('./ButtonWallet/ButtonWallet.js'); function Button(props) { const { type, props: buttonProps } = props; const SocialButtonProps = buttonProps; const WalletButtonProps = buttonProps; const { text, showIcon, showText, method, isDark, isPrimaryBtn, onClick, children, btnStyle, buttonRadius } = SocialButtonProps; const { label, onClick: walletOnClick, button, deviceDetails, walletConnectUri, buttonRadius: walletButtonRadius } = WalletButtonProps; return jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [type === Button_type.BUTTON_TYPE.SOCIAL && jsxRuntime.jsx(ButtonSocial, { text: text, showIcon: showIcon, showText: showText, method: method, isDark: isDark, isPrimaryBtn: isPrimaryBtn, onClick: onClick, btnStyle: btnStyle, buttonRadius: buttonRadius, children: children }), type === Button_type.BUTTON_TYPE.WALLET && jsxRuntime.jsx(ButtonWallet, { label: label, walletConnectUri: walletConnectUri, onClick: walletOnClick, button: button, deviceDetails: deviceDetails, buttonRadius: walletButtonRadius })] }); } module.exports = Button;