UNPKG

@lifi/widget

Version:

LI.FI Widget for cross-chain bridging and swapping. It will drive your multi-chain strategy and attract new users from everywhere.

15 lines 985 B
import { jsx as _jsx } from "react/jsx-runtime"; import CloseRounded from '@mui/icons-material/CloseRounded'; import { IconButton, Tooltip } from '@mui/material'; import { useTranslation } from 'react-i18next'; import { useDrawer } from '../../AppDrawerContext.js'; import { useExternalWalletProvider } from '../../providers/WalletProvider/useExternalWalletProvider.js'; export const CloseDrawerButton = ({ header }) => { const { t } = useTranslation(); const { closeDrawer } = useDrawer(); const { useExternalWalletProvidersOnly } = useExternalWalletProvider(); const showInNavigationHeader = header === 'navigation' && useExternalWalletProvidersOnly; const showInWalletHeader = header === 'wallet'; return showInNavigationHeader || showInWalletHeader ? (_jsx(Tooltip, { title: t('button.close'), children: _jsx(IconButton, { size: "medium", onClick: closeDrawer, children: _jsx(CloseRounded, {}) }) })) : null; }; //# sourceMappingURL=CloseDrawerButton.js.map