@arcblock/ux 3.0.5 → 3.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/ActionButton/index.d.ts +1 -1
- package/lib/ActionButton/index.js +9 -9
- package/lib/ActivityIndicator/index.js +6 -7
- package/lib/Address/compact-text.d.ts +1 -1
- package/lib/Address/compact-text.js +6 -7
- package/lib/Address/did-address.js +4 -4
- package/lib/Address/index.js +6 -6
- package/lib/Address/responsive-did-address.js +17 -17
- package/lib/Alert/index.d.ts +1 -1
- package/lib/Alert/index.js +8 -8
- package/lib/AnimationWaiter/index.js +10 -10
- package/lib/Async/index.js +4 -4
- package/lib/Avatar/etherscan-blockies.js +15 -15
- package/lib/Avatar/index.d.ts +1 -1
- package/lib/Avatar/index.js +6 -6
- package/lib/Badge/index.js +5 -5
- package/lib/Blocklet/blocklet.js +10 -10
- package/lib/Blocklet/index.js +6 -5
- package/lib/Blocklet/utils.js +1 -1
- package/lib/BlockletContext/index.d.ts +1 -1
- package/lib/BlockletContext/index.js +1 -1
- package/lib/BlockletNFT/index.js +19 -19
- package/lib/BlockletV2/blocklet.d.ts +1 -1
- package/lib/BlockletV2/blocklet.js +36 -37
- package/lib/BlockletV2/components/icon-text.d.ts +1 -1
- package/lib/BlockletV2/components/icon-text.js +13 -13
- package/lib/BlockletV2/components/tooltip-icon.js +22 -20
- package/lib/BlockletV2/index.js +8 -7
- package/lib/BlockletV2/utils.js +1 -1
- package/lib/Button/index.js +1 -1
- package/lib/Button/wrap.js +3 -3
- package/lib/ButtonGroup/index.js +1 -1
- package/lib/Center/index.js +4 -4
- package/lib/ClickToCopy/copy-button.js +3 -3
- package/lib/ClickToCopy/index.js +5 -5
- package/lib/CloseButton/index.js +2 -2
- package/lib/CodeBlock/index.js +3 -3
- package/lib/Colors/index.js +3 -3
- package/lib/Config/config-provider.js +15 -16
- package/lib/Config/index.js +3 -5
- package/lib/Config/theme-mode-toggle.js +1 -1
- package/lib/ContactForm/index.js +26 -25
- package/lib/CookieConsent/index.js +1 -1
- package/lib/CountDown/index.js +2 -2
- package/lib/DID/index.js +79 -78
- package/lib/DIDConnect/app-icon.js +10 -10
- package/lib/DIDConnect/app-info-item.js +5 -5
- package/lib/DIDConnect/auth-apps/auth-apps-info.js +1 -1
- package/lib/DIDConnect/auth-apps/index.js +56 -56
- package/lib/DIDConnect/did-connect-container.js +35 -36
- package/lib/DIDConnect/did-connect-footer.js +7 -7
- package/lib/DIDConnect/index.js +10 -10
- package/lib/DIDConnect/landing-page.js +45 -46
- package/lib/DIDConnect/powered-by.js +2 -2
- package/lib/DIDConnect/request-storage-access-api-dialog.js +44 -45
- package/lib/DIDConnect/with-container.js +25 -26
- package/lib/DIDConnect/with-ux-theme.js +6 -7
- package/lib/Datatable/CustomToolbar.d.ts +3 -1
- package/lib/Datatable/CustomToolbar.js +13 -13
- package/lib/Datatable/TableSearch.js +2 -2
- package/lib/Datatable/index.js +6 -6
- package/lib/Dialog/confirm.d.ts +1 -1
- package/lib/Dialog/confirm.js +20 -20
- package/lib/Dialog/dialog.js +7 -7
- package/lib/Dialog/index.js +3 -3
- package/lib/Dialog/types.d.ts +20 -0
- package/lib/Dialog/use-confirm.js +1 -1
- package/lib/DriftBot/index.js +1 -1
- package/lib/Earth/index.js +10 -10
- package/lib/Empty/index.js +1 -1
- package/lib/ErrorBoundary/fallback.js +15 -15
- package/lib/ErrorBoundary/index.js +1 -6
- package/lib/Footer/index.d.ts +1 -1
- package/lib/Footer/index.js +7 -7
- package/lib/Header/addon-button.d.ts +1 -1
- package/lib/Header/addon-button.js +11 -6
- package/lib/Header/auto-hidden.js +1 -1
- package/lib/Header/header.js +4 -4
- package/lib/Header/index.js +3 -3
- package/lib/Header/responsive-header.d.ts +1 -1
- package/lib/Header/responsive-header.js +33 -34
- package/lib/Icon/image.js +2 -2
- package/lib/Icon/index.js +12 -12
- package/lib/Img/index.js +1 -1
- package/lib/InfoRow/index.d.ts +1 -1
- package/lib/InfoRow/index.js +1 -2
- package/lib/Layout/dashboard/external-link.d.ts +1 -1
- package/lib/Layout/dashboard/external-link.js +1 -1
- package/lib/Layout/dashboard/full-page.js +8 -8
- package/lib/Layout/dashboard/index.js +30 -32
- package/lib/Layout/dashboard/sidebar.js +3 -3
- package/lib/Layout/dashboard-legacy/header.js +12 -12
- package/lib/Layout/dashboard-legacy/index.js +20 -20
- package/lib/Layout/dashboard-legacy/sidebar.d.ts +1 -1
- package/lib/Layout/dashboard-legacy/sidebar.js +20 -13
- package/lib/Layout/index.js +7 -7
- package/lib/LoadingMask/index.d.ts +1 -1
- package/lib/LoadingMask/index.js +4 -4
- package/lib/Locale/context.js +27 -27
- package/lib/Locale/selector.d.ts +1 -1
- package/lib/Locale/selector.js +4 -4
- package/lib/Logo/index.js +19 -19
- package/lib/Metric/index.js +2 -2
- package/lib/NFTDisplay/aspect-ratio-container.d.ts +1 -1
- package/lib/NFTDisplay/aspect-ratio-container.js +1 -1
- package/lib/NFTDisplay/broken.js +2 -2
- package/lib/NFTDisplay/index.js +38 -35
- package/lib/NFTDisplay/loading.js +1 -1
- package/lib/NFTDisplay/render-svg.js +4 -4
- package/lib/NFTDisplay/svg-embedder/img.js +3 -3
- package/lib/NFTDisplay/svg-embedder/inline-svg.js +1 -1
- package/lib/NavMenu/index.js +2 -2
- package/lib/NavMenu/nav-menu.js +46 -44
- package/lib/NavMenu/products.js +33 -33
- package/lib/NavMenu/style.js +1 -1
- package/lib/NavMenu/sub-item-group.js +1 -1
- package/lib/PageScroller/index.js +53 -53
- package/lib/PageScroller/story/FullPage.js +27 -27
- package/lib/PageScroller/story/PageContain.js +8 -8
- package/lib/Passport/index.js +3 -2
- package/lib/Passport/passport.js +2 -2
- package/lib/PhoneInput/country-select.js +24 -24
- package/lib/PhoneInput/index.js +13 -13
- package/lib/PoweredByArcBlock/index.js +10 -6
- package/lib/PricingTable/PricingPlan.js +1 -1
- package/lib/PricingTable/index.js +3 -3
- package/lib/QRCode/index.js +5 -5
- package/lib/RelativeTime/index.js +17 -17
- package/lib/Result/common.js +4 -6
- package/lib/Result/index.js +2 -2
- package/lib/Result/result.js +5 -5
- package/lib/Screenshot/BaseScreenshot/index.js +3 -3
- package/lib/Screenshot/index.d.ts +1 -1
- package/lib/Screenshot/index.js +10 -10
- package/lib/SessionBlocklet/index.js +8 -8
- package/lib/SessionManager/index.js +3 -2
- package/lib/SessionUser/components/did-space.d.ts +1 -1
- package/lib/SessionUser/components/did-space.js +14 -14
- package/lib/SessionUser/components/logged-in.js +33 -33
- package/lib/SessionUser/components/quick-login-item.js +29 -29
- package/lib/SessionUser/components/session-user-item.js +27 -27
- package/lib/SessionUser/components/session-user-switch.js +4 -4
- package/lib/SessionUser/components/un-login.js +7 -7
- package/lib/SessionUser/components/user-info.js +16 -16
- package/lib/SessionUser/index.js +2 -2
- package/lib/SharedBridge/index.js +23 -23
- package/lib/Spinner/index.js +2 -2
- package/lib/SplitButton/index.d.ts +1 -1
- package/lib/SplitButton/index.js +2 -2
- package/lib/Success/index.js +1 -1
- package/lib/Switch/index.js +1 -1
- package/lib/Tabs/index.js +16 -9
- package/lib/Tag/index.d.ts +1 -1
- package/lib/Tag/index.js +7 -7
- package/lib/TextCollapse/index.js +3 -3
- package/lib/Theme/index.js +11 -22
- package/lib/Theme/theme-provider.js +60 -55
- package/lib/Theme/theme.js +5 -4
- package/lib/Toast/index.js +11 -11
- package/lib/Typography/index.js +13 -13
- package/lib/UserCard/Cards/avatar-only.js +2 -2
- package/lib/UserCard/Cards/basic-info.d.ts +1 -1
- package/lib/UserCard/Cards/basic-info.js +4 -4
- package/lib/UserCard/Cards/index.d.ts +1 -1
- package/lib/UserCard/Cards/index.js +4 -4
- package/lib/UserCard/Cards/name-only.js +1 -1
- package/lib/UserCard/Container/card.js +8 -8
- package/lib/UserCard/Container/dialog.js +2 -2
- package/lib/UserCard/Content/basic.js +3 -3
- package/lib/UserCard/Content/clock.js +3 -3
- package/lib/UserCard/Content/minimal.d.ts +1 -1
- package/lib/UserCard/Content/minimal.js +8 -8
- package/lib/UserCard/Content/tooltip-avatar.js +18 -18
- package/lib/UserCard/components.js +23 -23
- package/lib/UserCard/index.js +12 -12
- package/lib/Util/index.js +2 -2
- package/lib/VerificationCode/index.js +2 -2
- package/lib/Video/index.js +2 -2
- package/lib/Wallet/Action.js +4 -4
- package/lib/Wallet/Download.js +6 -6
- package/lib/Wallet/Open.js +1 -1
- package/lib/WalletOSIcon/index.d.ts +2 -2
- package/lib/WalletOSIcon/index.js +8 -3
- package/lib/WebWalletSWKeeper/index.d.ts +3 -1
- package/lib/WebWalletSWKeeper/index.js +6 -3
- package/lib/WechatPrompt/index.js +1 -1
- package/lib/global.d.ts +28 -0
- package/lib/hooks/use-blocklet-logo.js +13 -15
- package/lib/hooks/use-clock.js +1 -1
- package/lib/index.js +74 -79
- package/lib/type.d.ts +44 -0
- package/lib/withTheme/index.d.ts +3 -2
- package/lib/withTheme/index.js +13 -14
- package/lib/withTracker/error_boundary.js +1 -1
- package/package.json +7 -7
- package/src/ActionButton/index.jsx +1 -1
- package/src/Address/compact-text.jsx +1 -1
- package/src/Address/did-address.tsx +1 -1
- package/src/Address/index.tsx +1 -1
- package/src/Address/responsive-did-address.tsx +3 -3
- package/src/Alert/index.jsx +1 -1
- package/src/Avatar/index.jsx +1 -1
- package/src/Badge/index.jsx +1 -1
- package/src/BlockletContext/index.tsx +1 -1
- package/src/BlockletNFT/index.jsx +1 -1
- package/src/BlockletV2/blocklet.tsx +1 -1
- package/src/BlockletV2/components/icon-text.tsx +4 -4
- package/src/BlockletV2/components/tooltip-icon.tsx +5 -3
- package/src/Button/wrap.jsx +1 -1
- package/src/Center/index.tsx +1 -1
- package/src/ClickToCopy/copy-button.tsx +1 -1
- package/src/CloseButton/index.tsx +1 -1
- package/src/ContactForm/index.tsx +9 -2
- package/src/DID/index.tsx +5 -4
- package/src/DIDConnect/app-info-item.tsx +1 -1
- package/src/DIDConnect/auth-apps/index.tsx +8 -8
- package/src/DIDConnect/did-connect-container.tsx +2 -2
- package/src/DIDConnect/did-connect-footer.tsx +1 -1
- package/src/DIDConnect/landing-page.tsx +6 -6
- package/src/DIDConnect/request-storage-access-api-dialog.tsx +1 -2
- package/src/Datatable/CustomToolbar.jsx +1 -1
- package/src/Datatable/index.jsx +2 -2
- package/src/Dialog/confirm.jsx +1 -1
- package/src/Earth/index.tsx +1 -1
- package/src/Footer/index.tsx +5 -2
- package/src/Header/addon-button.tsx +7 -2
- package/src/Header/header.tsx +1 -1
- package/src/Header/responsive-header.tsx +1 -2
- package/src/Icon/index.tsx +1 -1
- package/src/InfoRow/index.tsx +1 -2
- package/src/Layout/dashboard/external-link.tsx +1 -1
- package/src/Layout/dashboard/full-page.tsx +1 -1
- package/src/Layout/dashboard/index.tsx +1 -1
- package/src/Layout/dashboard/sidebar.tsx +5 -2
- package/src/Layout/dashboard-legacy/header.tsx +5 -5
- package/src/Layout/dashboard-legacy/index.tsx +3 -3
- package/src/Layout/dashboard-legacy/sidebar.tsx +10 -2
- package/src/Layout/index.tsx +2 -2
- package/src/LoadingMask/index.tsx +5 -5
- package/src/Locale/context.tsx +3 -3
- package/src/Locale/selector.tsx +1 -1
- package/src/Logo/index.tsx +1 -1
- package/src/NFTDisplay/aspect-ratio-container.tsx +1 -1
- package/src/NFTDisplay/index.tsx +2 -1
- package/src/NFTDisplay/render-svg.tsx +1 -1
- package/src/NavMenu/nav-menu.tsx +8 -5
- package/src/NavMenu/products.tsx +3 -1
- package/src/PageScroller/index.tsx +4 -4
- package/src/PhoneInput/country-select.tsx +3 -3
- package/src/PhoneInput/index.tsx +1 -1
- package/src/PoweredByArcBlock/index.tsx +5 -1
- package/src/QRCode/index.tsx +1 -1
- package/src/RelativeTime/index.tsx +3 -3
- package/src/Result/result.tsx +1 -1
- package/src/Screenshot/index.tsx +2 -2
- package/src/SessionUser/components/did-space.tsx +1 -1
- package/src/SessionUser/components/session-user-item.tsx +1 -1
- package/src/SharedBridge/index.tsx +2 -2
- package/src/Spinner/index.tsx +1 -1
- package/src/SplitButton/index.tsx +1 -1
- package/src/Success/index.tsx +1 -1
- package/src/Tabs/index.tsx +10 -3
- package/src/Tag/index.jsx +1 -1
- package/src/TextCollapse/index.tsx +1 -1
- package/src/Theme/theme-provider.tsx +11 -6
- package/src/Theme/theme.ts +5 -0
- package/src/Typography/index.tsx +1 -1
- package/src/UserCard/Cards/basic-info.tsx +1 -1
- package/src/UserCard/Cards/index.tsx +1 -1
- package/src/UserCard/Container/card.tsx +2 -2
- package/src/UserCard/Container/dialog.tsx +1 -1
- package/src/UserCard/Content/basic.tsx +2 -2
- package/src/UserCard/Content/minimal.tsx +1 -1
- package/src/UserCard/Content/tooltip-avatar.tsx +4 -4
- package/src/VerificationCode/index.tsx +1 -1
- package/src/WalletOSIcon/index.tsx +7 -2
- package/src/WebWalletSWKeeper/index.tsx +6 -1
- package/src/withTheme/index.tsx +7 -3
- package/vite.config.mjs +5 -2
- package/lib/ActionButton/ActionButton.stories.d.ts +0 -18
- package/lib/ActivityIndicator/ActivityIndicator.stories.d.ts +0 -8
- package/lib/Address/Address.stories.d.ts +0 -16
- package/lib/Alert/Alert.stories.d.ts +0 -28
- package/lib/AnimationWaiter/AnimationWaiter.stories.d.ts +0 -21
- package/lib/AnimationWaiter/dark-animation.json.js +0 -27
- package/lib/AnimationWaiter/default-animation.json.js +0 -29
- package/lib/Avatar/Avatar.stories.d.ts +0 -11
- package/lib/Badge/Badge.stories.d.ts +0 -13
- package/lib/Blocklet/Blocklet.stories.d.ts +0 -17
- package/lib/BlockletNFT/BlockletNFT.stories.d.ts +0 -17
- package/lib/BlockletV2/Blocklet.stories.d.ts +0 -18
- package/lib/Button/Button.stories.d.ts +0 -19
- package/lib/Center/Center.stories.d.ts +0 -18
- package/lib/ClickToCopy/ClickToCopy.stories.d.ts +0 -16
- package/lib/CodeBlock/CodeBlock.stories.d.ts +0 -20
- package/lib/Colors/Colors.stories.d.ts +0 -34
- package/lib/Config/Config.stories.d.ts +0 -14
- package/lib/ContactForm/ContactForm.stories.d.ts +0 -23
- package/lib/CookieConsent/CookieConsent.stories.d.ts +0 -18
- package/lib/CountDown/CountDown.stories.d.ts +0 -14
- package/lib/DID/DID.stories.d.ts +0 -15
- package/lib/Datatable/Datatable.stories.d.ts +0 -32
- package/lib/Dialog/Dialog.stories.d.ts +0 -20
- package/lib/DidLogo/Logo.stories.d.ts +0 -8
- package/lib/Earth/Earth.stories.d.ts +0 -18
- package/lib/Earth/countries.json.js +0 -13
- package/lib/Empty/Empty.stories.d.ts +0 -17
- package/lib/ErrorBoundary/ErrorBoundary.stories.d.ts +0 -12
- package/lib/Footer/Footer.stories.d.ts +0 -12
- package/lib/Header/Header.stories.d.ts +0 -21
- package/lib/Icon/Icon.stories.d.ts +0 -23
- package/lib/Img/Img.stories.d.ts +0 -13
- package/lib/InfoRow/InfoRow.stories.d.ts +0 -14
- package/lib/Layout/Layout.stories.d.ts +0 -23
- package/lib/Locale/LocaleSelector.stories.d.ts +0 -22
- package/lib/Logo/Logo.stories.d.ts +0 -22
- package/lib/Logo/images/logo-dark-text.svg.js +0 -5
- package/lib/Logo/images/logo-dark-top.svg.js +0 -5
- package/lib/Logo/images/logo-light-text.svg.js +0 -5
- package/lib/Logo/images/logo-light-top.svg.js +0 -5
- package/lib/Metric/Metric.stories.d.ts +0 -14
- package/lib/NFTDisplay/NFTBroken.svg.js +0 -108
- package/lib/NFTDisplay/NFTDisplay.stories.d.ts +0 -15
- package/lib/NavMenu/NavMenu.stories.d.ts +0 -17
- package/lib/NavMenu/images/OCAP.svg.js +0 -5
- package/lib/NavMenu/images/abt-network.svg.js +0 -7
- package/lib/NavMenu/images/ai-kit.svg.js +0 -7
- package/lib/NavMenu/images/aigne.svg.js +0 -7
- package/lib/NavMenu/images/aistro.svg.js +0 -5
- package/lib/NavMenu/images/arcsphere.svg.js +0 -10
- package/lib/NavMenu/images/blocklet-framework.svg.js +0 -7
- package/lib/NavMenu/images/blocklet-launcher.svg.js +0 -5
- package/lib/NavMenu/images/blocklet-server.svg.js +0 -7
- package/lib/NavMenu/images/blocklet-store.svg.js +0 -5
- package/lib/NavMenu/images/creator-studio.svg.js +0 -7
- package/lib/NavMenu/images/did-connect.svg.js +0 -5
- package/lib/NavMenu/images/did-name-service.svg.js +0 -5
- package/lib/NavMenu/images/did-wallet.svg.js +0 -7
- package/lib/NavMenu/images/did.svg.js +0 -5
- package/lib/NavMenu/images/nft-studio.svg.js +0 -5
- package/lib/NavMenu/images/vc.svg.js +0 -5
- package/lib/NavMenu/images/web3-kit.svg.js +0 -7
- package/lib/PageScroller/story/PageScroller.stories.d.ts +0 -13
- package/lib/PhoneInput/PhoneInput.stories.d.ts +0 -12
- package/lib/PricingTable/PricingTable.stories.d.ts +0 -8
- package/lib/QRCode/QRCode.stories.d.ts +0 -13
- package/lib/RelativeTime/RelativeTime.stories.d.ts +0 -20
- package/lib/Result/Result.stories.d.ts +0 -21
- package/lib/Screenshot/Screenshot.stories.d.ts +0 -13
- package/lib/SessionManager/SessionManager.stories.d.ts +0 -9
- package/lib/SessionUser/images/did-spaces.svg.js +0 -5
- package/lib/Sparkline/Sparkline.stories.d.ts +0 -12
- package/lib/Spinner/Spinner.stories.d.ts +0 -18
- package/lib/SplitButton/SplitButton.stories.d.ts +0 -15
- package/lib/Switch/Switch.stories.d.ts +0 -13
- package/lib/Tabs/Tabs.stories.d.ts +0 -14
- package/lib/Tag/Tag.stories.d.ts +0 -13
- package/lib/TextCollapse/TextCollapse.stories.d.ts +0 -28
- package/lib/Theme/Theme.stories.d.ts +0 -10
- package/lib/Toast/Toast.stories.d.ts +0 -15
- package/lib/UserCard/UserCard.stories.d.ts +0 -18
- package/lib/Util/WebWalletOpener.stories.d.ts +0 -5
- package/lib/Video/Video.stories.d.ts +0 -6
- package/lib/Wallet/Action.stories.d.ts +0 -8
- package/lib/Wallet/Download.stories.d.ts +0 -9
- package/lib/Wallet/OpenInWallet.stories.d.ts +0 -5
- package/lib/Wallet/images/android_download.svg.js +0 -5
- package/lib/Wallet/images/app-store.svg.js +0 -5
- package/lib/Wallet/images/google-play.svg.js +0 -5
- package/lib/ux.css +0 -1
@@ -19,13 +19,20 @@ export type LinkItem = {
|
|
19
19
|
export interface SidebarProps extends React.HTMLAttributes<HTMLDivElement> {
|
20
20
|
images: Record<string, string>;
|
21
21
|
links: LinkItem[];
|
22
|
-
prefix
|
22
|
+
prefix?: string;
|
23
23
|
addons?: React.ReactNode;
|
24
24
|
logo?: React.ReactNode;
|
25
25
|
sx?: SxProps;
|
26
26
|
}
|
27
27
|
|
28
|
-
export default function Sidebar({
|
28
|
+
export default function Sidebar({
|
29
|
+
images,
|
30
|
+
links,
|
31
|
+
prefix = '/images',
|
32
|
+
addons = undefined,
|
33
|
+
logo = undefined,
|
34
|
+
...rest
|
35
|
+
}: SidebarProps) {
|
29
36
|
const theme = useTheme();
|
30
37
|
const location = useLocation();
|
31
38
|
const isSelected = (_: string, name: string) => {
|
@@ -45,6 +52,7 @@ export default function Sidebar({ images, links, prefix = '/images', addons, log
|
|
45
52
|
<ImageIcon
|
46
53
|
name={images[name]}
|
47
54
|
size={36}
|
55
|
+
// @ts-expect-error
|
48
56
|
color={selected ? '#00c2c4' : theme.typography.color.main}
|
49
57
|
prefix={prefix}
|
50
58
|
showBadge={showBadge}
|
package/src/Layout/index.tsx
CHANGED
@@ -42,11 +42,11 @@ export interface LayoutProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
42
42
|
export default function Layout({
|
43
43
|
title,
|
44
44
|
brand,
|
45
|
-
description,
|
45
|
+
description = undefined,
|
46
46
|
links = [],
|
47
47
|
logo = <Logo showText={false} style={{ width: '40px', height: '40px' }} />,
|
48
48
|
showLogo = false,
|
49
|
-
addons,
|
49
|
+
addons = undefined,
|
50
50
|
footer = (
|
51
51
|
<Container>
|
52
52
|
<Footer />
|
@@ -6,15 +6,15 @@ export interface LoadingMaskProps {
|
|
6
6
|
borderWidth?: number;
|
7
7
|
borderRadius?: number;
|
8
8
|
duration?: number;
|
9
|
-
children
|
9
|
+
children: React.ReactNode;
|
10
10
|
}
|
11
11
|
|
12
12
|
export default function LoadingMask({
|
13
13
|
size = 64,
|
14
|
-
padding,
|
15
|
-
borderWidth,
|
16
|
-
borderRadius,
|
17
|
-
duration,
|
14
|
+
padding = undefined,
|
15
|
+
borderWidth = undefined,
|
16
|
+
borderRadius = undefined,
|
17
|
+
duration = undefined,
|
18
18
|
children,
|
19
19
|
}: LoadingMaskProps) {
|
20
20
|
const finialSize = size;
|
package/src/Locale/context.tsx
CHANGED
@@ -94,10 +94,10 @@ const { Provider, Consumer } = LocaleContext;
|
|
94
94
|
|
95
95
|
function LocaleProvider({
|
96
96
|
children,
|
97
|
-
locale,
|
98
|
-
fallbackLocale,
|
97
|
+
locale = undefined,
|
98
|
+
fallbackLocale = undefined,
|
99
99
|
translations,
|
100
|
-
onLoadingTranslation,
|
100
|
+
onLoadingTranslation = undefined,
|
101
101
|
languages = [],
|
102
102
|
...rest
|
103
103
|
}: LocaleProviderProps) {
|
package/src/Locale/selector.tsx
CHANGED
@@ -29,7 +29,7 @@ export interface LocaleSelectorProps extends Omit<React.HTMLAttributes<HTMLDivEl
|
|
29
29
|
onChange?: (locale: Locale) => void;
|
30
30
|
}
|
31
31
|
|
32
|
-
export default function LocaleSelector(props: LocaleSelectorProps) {
|
32
|
+
export default function LocaleSelector({ ...props }: LocaleSelectorProps) {
|
33
33
|
const { showText = true, popperProps = {}, popperType = 'click', icon: Icon, size = 24, ...rest } = props;
|
34
34
|
const { locale, changeLocale, languages } = use(LocaleContext);
|
35
35
|
const anchorEl = useRef<HTMLButtonElement>(null);
|
package/src/Logo/index.tsx
CHANGED
package/src/NFTDisplay/index.tsx
CHANGED
@@ -94,6 +94,7 @@ function NFTDisplay({
|
|
94
94
|
...rest
|
95
95
|
}: NFTDisplayProps) {
|
96
96
|
const wrapRoot = (children: React.ReactNode) => (
|
97
|
+
// @ts-expect-error
|
97
98
|
<Root component={component} {...rest} className={clsx(className, { 'nft-display--inset': inset })}>
|
98
99
|
{children}
|
99
100
|
</Root>
|
@@ -375,7 +376,7 @@ const Root = styled(Box)`
|
|
375
376
|
|
376
377
|
function withAspectRatio(Component: React.ComponentType<NFTDisplayProps>) {
|
377
378
|
// eslint-disable-next-line func-names, react/prop-types
|
378
|
-
return function ({ aspect, inset, ...rest }: NFTDisplayProps) {
|
379
|
+
return function ({ aspect = undefined, inset = false, ...rest }: NFTDisplayProps) {
|
379
380
|
// inset 比 aspect ratio 优先级高, 如果同时设置了 inset 和 aspect, 则后者不生效
|
380
381
|
const applyAspectRatio = aspect && aspect > 0 && !inset;
|
381
382
|
if (applyAspectRatio) {
|
@@ -4,7 +4,7 @@ import axios from 'axios';
|
|
4
4
|
import { useState } from 'react';
|
5
5
|
import InlineSvg from './svg-embedder/inline-svg';
|
6
6
|
|
7
|
-
function RenderSvg({ src, onLoad }: { src: string; onLoad?: () => void }) {
|
7
|
+
function RenderSvg({ src, onLoad = undefined }: { src: string; onLoad?: () => void }) {
|
8
8
|
const [svgContent, setSvgContent] = useState('');
|
9
9
|
|
10
10
|
useAsyncEffect(async () => {
|
package/src/NavMenu/nav-menu.tsx
CHANGED
@@ -63,10 +63,13 @@ function NavMenu({
|
|
63
63
|
mode = 'horizontal',
|
64
64
|
children: _childs = null,
|
65
65
|
activeId = null,
|
66
|
+
// eslint-disable-next-line react/require-default-props
|
66
67
|
textColor,
|
68
|
+
// eslint-disable-next-line react/require-default-props
|
67
69
|
activeTextColor,
|
70
|
+
// eslint-disable-next-line react/require-default-props
|
68
71
|
bgColor,
|
69
|
-
onSelected,
|
72
|
+
onSelected = undefined,
|
70
73
|
...rest
|
71
74
|
}: NavMenuProps) {
|
72
75
|
const theme = useTheme();
|
@@ -294,11 +297,11 @@ export interface ItemProps extends React.HTMLAttributes<HTMLLIElement> {
|
|
294
297
|
}
|
295
298
|
|
296
299
|
export function Item({
|
297
|
-
ref,
|
300
|
+
ref = undefined,
|
298
301
|
id: _id = '',
|
299
302
|
icon = null,
|
300
303
|
label = '',
|
301
|
-
description,
|
304
|
+
description = undefined,
|
302
305
|
active = false,
|
303
306
|
variant = 'default',
|
304
307
|
onClick = noop,
|
@@ -353,13 +356,13 @@ export interface SubProps extends Omit<ItemProps, 'children' | 'active'> {
|
|
353
356
|
}
|
354
357
|
|
355
358
|
export function Sub({
|
356
|
-
ref,
|
359
|
+
ref = undefined,
|
357
360
|
id: _id = '',
|
358
361
|
icon = null,
|
359
362
|
label = null,
|
360
363
|
description,
|
361
364
|
variant = 'default',
|
362
|
-
children,
|
365
|
+
children = undefined,
|
363
366
|
|
364
367
|
expandIcon = ({ isOpen }) => (
|
365
368
|
<ExpandMoreIcon
|
package/src/NavMenu/products.tsx
CHANGED
@@ -201,7 +201,9 @@ export interface ProductsProps extends BoxProps {
|
|
201
201
|
isOpen?: boolean;
|
202
202
|
}
|
203
203
|
|
204
|
-
|
204
|
+
// FIXME: @lixl39505 isOpen 没有用,是否要移除?
|
205
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
206
|
+
export default function Products({ className, isOpen = undefined, ...rest }: ProductsProps) {
|
205
207
|
const { mode } = useNavMenuContext();
|
206
208
|
const { palette } = useTheme();
|
207
209
|
const wrapperRef = useRef<HTMLDivElement>(null);
|
@@ -49,12 +49,12 @@ function PageScroller({
|
|
49
49
|
animationTimer = DEFAULT_ANIMATION_TIMER,
|
50
50
|
blockScrollDown = false,
|
51
51
|
blockScrollUp = false,
|
52
|
-
children: _children,
|
52
|
+
children: _children = undefined,
|
53
53
|
height = DEFAULT_CONTAINER_HEIGHT,
|
54
54
|
width = DEFAULT_CONTAINER_WIDTH,
|
55
|
-
customPageNumber,
|
56
|
-
onScrollUnavailable,
|
57
|
-
onChange,
|
55
|
+
customPageNumber = undefined,
|
56
|
+
onScrollUnavailable = undefined,
|
57
|
+
onChange = undefined,
|
58
58
|
renderAllPagesOnFirstRender = false,
|
59
59
|
transitionTimingFunction = DEFAULT_ANIMATION,
|
60
60
|
}: PageScrollerProps) {
|
@@ -27,11 +27,11 @@ type CountrySelectComponent = <T extends keyof ParsedCountry = 'iso2'>(
|
|
27
27
|
|
28
28
|
// 实现组件
|
29
29
|
function CountrySelectInner<T extends keyof ParsedCountry = 'iso2'>({
|
30
|
-
ref,
|
30
|
+
ref = undefined,
|
31
31
|
value,
|
32
|
-
onChange,
|
32
|
+
onChange = undefined,
|
33
33
|
sx = {},
|
34
|
-
selectCountryProps,
|
34
|
+
selectCountryProps = undefined,
|
35
35
|
preview = false,
|
36
36
|
valueField = 'iso2' as T,
|
37
37
|
...rest
|
package/src/PhoneInput/index.tsx
CHANGED
@@ -125,7 +125,7 @@ export function detectCountryFromPhone(phoneNumber?: string): CountryIso2 | unde
|
|
125
125
|
|
126
126
|
export default function PhoneInput({
|
127
127
|
value = { country: 'us', phone: '' },
|
128
|
-
onChange,
|
128
|
+
onChange = undefined,
|
129
129
|
placeholder = 'Enter phone number',
|
130
130
|
countryDisplayOptions = {},
|
131
131
|
preview = false,
|
@@ -6,7 +6,11 @@ export interface PoweredByArcBlockProps extends TypographyProps {
|
|
6
6
|
showExtra?: boolean;
|
7
7
|
}
|
8
8
|
|
9
|
-
export default function PoweredByArcBlock({
|
9
|
+
export default function PoweredByArcBlock({
|
10
|
+
linkProps = undefined,
|
11
|
+
showExtra = false,
|
12
|
+
...props
|
13
|
+
}: PoweredByArcBlockProps) {
|
10
14
|
return (
|
11
15
|
<Typography {...props}>
|
12
16
|
Powered by{' '}
|
package/src/QRCode/index.tsx
CHANGED
@@ -28,7 +28,7 @@ export interface QRCodeProps {
|
|
28
28
|
|
29
29
|
// 该组件用于生成与 android wallet 样式风格相似的 qrcode
|
30
30
|
// 注意: 依赖的 @solana/qr-code-styling 是一份 fork 版本, 原版本的 margin 配置存在 bug
|
31
|
-
function QRCode({ data, size, image, config = {}, ...rest }: QRCodeProps) {
|
31
|
+
function QRCode({ data, size, image = undefined, config = {}, ...rest }: QRCodeProps) {
|
32
32
|
const ref = useRef(null);
|
33
33
|
const options = useMemo(() => {
|
34
34
|
return {
|
@@ -167,7 +167,7 @@ function useRelativeTime({
|
|
167
167
|
|
168
168
|
function UTCChip({
|
169
169
|
locale,
|
170
|
-
isUtc,
|
170
|
+
isUtc = false,
|
171
171
|
setIsUtc,
|
172
172
|
useShortTimezone = true,
|
173
173
|
}: {
|
@@ -213,8 +213,8 @@ export default function RelativeTime({
|
|
213
213
|
from = '',
|
214
214
|
to = '',
|
215
215
|
type = 'relative',
|
216
|
-
tz,
|
217
|
-
relativeRange,
|
216
|
+
tz = undefined,
|
217
|
+
relativeRange = undefined,
|
218
218
|
enableTooltip = true,
|
219
219
|
useShortTimezone = false,
|
220
220
|
disableTimezone = false,
|
package/src/Result/result.tsx
CHANGED
@@ -9,7 +9,7 @@ export interface ResultProps {
|
|
9
9
|
extra?: React.ReactNode;
|
10
10
|
}
|
11
11
|
|
12
|
-
function Result({ icon, title = '', description = '', extra, ...rest }: ResultProps) {
|
12
|
+
function Result({ icon = null, title = '', description = '', extra = null, ...rest }: ResultProps) {
|
13
13
|
return (
|
14
14
|
<Root {...rest}>
|
15
15
|
{icon}
|
package/src/Screenshot/index.tsx
CHANGED
@@ -126,7 +126,7 @@ const findChildren = (
|
|
126
126
|
};
|
127
127
|
|
128
128
|
export interface OldScreenshotProps extends React.ComponentProps<'div'> {
|
129
|
-
type
|
129
|
+
type: keyof typeof types;
|
130
130
|
className?: string;
|
131
131
|
style?: React.CSSProperties;
|
132
132
|
width?: number;
|
@@ -222,7 +222,7 @@ export interface ScreenFixerProps extends OldScreenshotProps {}
|
|
222
222
|
* @param {*} props params to OldScreenshot
|
223
223
|
* @returns <OldScreenshot />
|
224
224
|
*/
|
225
|
-
function ScreenFixer(props: ScreenFixerProps) {
|
225
|
+
function ScreenFixer({ ...props }: ScreenFixerProps) {
|
226
226
|
const screenEl = useRef<HTMLDivElement>(null);
|
227
227
|
const [height, setHeight] = useState<number>();
|
228
228
|
const [scale, setScale] = useState<number | null>(null);
|
@@ -9,11 +9,11 @@ import { mergeSx } from '../Util/style';
|
|
9
9
|
import { callIframe, getCallbackAction } from '../Util/iframe';
|
10
10
|
|
11
11
|
function SharedBridge({
|
12
|
-
ref,
|
12
|
+
ref = undefined,
|
13
13
|
src,
|
14
14
|
onClick,
|
15
15
|
onLoad = noop,
|
16
|
-
sx,
|
16
|
+
sx = {},
|
17
17
|
...rest
|
18
18
|
}: {
|
19
19
|
src: string;
|
package/src/Spinner/index.tsx
CHANGED
@@ -7,7 +7,7 @@ export interface SpinnerProps extends Omit<CircularProgressProps, 'size'> {
|
|
7
7
|
}
|
8
8
|
|
9
9
|
/** 之前的 Spinner 实现由内外 2 个环构成, 现在改为基于 @mui/material/CircularProgress 的实现 */
|
10
|
-
function Spinner(props: SpinnerProps) {
|
10
|
+
function Spinner({ ...props }: SpinnerProps) {
|
11
11
|
const _props = { ...props } as CircularProgressProps;
|
12
12
|
|
13
13
|
// 兼容之前的 size prop (设置外圈/内圈的尺寸)
|
@@ -26,7 +26,7 @@ export interface SplitButtonProps extends Omit<ButtonGroupProps, 'children'> {
|
|
26
26
|
menuButtonProps?: ButtonProps;
|
27
27
|
}
|
28
28
|
|
29
|
-
export default function SplitButton(props: SplitButtonProps) {
|
29
|
+
export default function SplitButton({ ...props }: SplitButtonProps) {
|
30
30
|
const {
|
31
31
|
size = 'medium',
|
32
32
|
color = 'primary',
|
package/src/Success/index.tsx
CHANGED
@@ -7,7 +7,7 @@ export interface SuccessProps {
|
|
7
7
|
}
|
8
8
|
|
9
9
|
// FIXME: @zhanghan 目前无法适配各种 size,后续优化
|
10
|
-
export default function Success({ size = 64, backgroundColor, borderWidth = 4 }: SuccessProps) {
|
10
|
+
export default function Success({ size = 64, backgroundColor = undefined, borderWidth = 4 }: SuccessProps) {
|
11
11
|
const { palette } = useTheme();
|
12
12
|
const contentSize = size - borderWidth * 2;
|
13
13
|
const _backgroundColor = backgroundColor || palette.background.default;
|
package/src/Tabs/index.tsx
CHANGED
@@ -27,7 +27,7 @@ interface CardTabsProps extends Omit<MuiTabsProps, 'onChange'> {
|
|
27
27
|
iconPosition?: TabProps['iconPosition'];
|
28
28
|
}
|
29
29
|
|
30
|
-
function CardTabs({ tabs, current, onChange, iconPosition, ...rest }: CardTabsProps) {
|
30
|
+
function CardTabs({ tabs, current, onChange, iconPosition = undefined, ...rest }: CardTabsProps) {
|
31
31
|
return (
|
32
32
|
<MuiTabs
|
33
33
|
scrollButtons="auto"
|
@@ -97,7 +97,7 @@ interface LineTabsProps extends Omit<MuiTabsProps, 'onChange'> {
|
|
97
97
|
iconPosition?: TabProps['iconPosition'];
|
98
98
|
}
|
99
99
|
|
100
|
-
function LineTabs({ tabs, current, onChange, iconPosition, ...rest }: LineTabsProps) {
|
100
|
+
function LineTabs({ tabs, current, onChange, iconPosition = undefined, ...rest }: LineTabsProps) {
|
101
101
|
return (
|
102
102
|
<MuiTabs
|
103
103
|
scrollButtons="auto"
|
@@ -176,7 +176,14 @@ interface TabsProps extends Omit<MuiTabsProps, 'variant' | 'onChange'> {
|
|
176
176
|
iconPosition?: TabProps['iconPosition'];
|
177
177
|
}
|
178
178
|
|
179
|
-
export default function Tabs({
|
179
|
+
export default function Tabs({
|
180
|
+
tabs,
|
181
|
+
current,
|
182
|
+
onChange,
|
183
|
+
variant = undefined,
|
184
|
+
iconPosition = undefined,
|
185
|
+
...rest
|
186
|
+
}: TabsProps) {
|
180
187
|
if (variant === 'card') {
|
181
188
|
return <CardTabs {...rest} tabs={tabs} current={current} onChange={onChange} iconPosition={iconPosition} />;
|
182
189
|
}
|
package/src/Tag/index.jsx
CHANGED
@@ -46,7 +46,7 @@ const types = {
|
|
46
46
|
* @param {TagProps} props
|
47
47
|
* @return {import('react').ReactNode}
|
48
48
|
*/
|
49
|
-
function Tag(rawProps) {
|
49
|
+
function Tag({ ...rawProps }) {
|
50
50
|
const props = Object.assign({}, rawProps);
|
51
51
|
if (isUndefined(props.type)) {
|
52
52
|
props.type = 'primary';
|
@@ -44,7 +44,7 @@ const resolveMode = (prefer?: Prefer): PaletteMode => {
|
|
44
44
|
};
|
45
45
|
|
46
46
|
/** 深色模式全局样式 */
|
47
|
-
function DarkSchemeStyles({ className }: { className?: string }) {
|
47
|
+
function DarkSchemeStyles({ className = undefined }: { className?: string }) {
|
48
48
|
const theme = useTheme();
|
49
49
|
|
50
50
|
if (theme.palette.mode === 'dark') {
|
@@ -122,7 +122,7 @@ interface BaseThemeProviderProps {
|
|
122
122
|
|
123
123
|
/** 快速配置 MUI 主题 */
|
124
124
|
function BaseThemeProvider({
|
125
|
-
children,
|
125
|
+
children = null,
|
126
126
|
theme = defaultTheme,
|
127
127
|
injectFirst = true,
|
128
128
|
darkSchemeClass = '',
|
@@ -157,9 +157,9 @@ interface ColorSchemeProviderProps extends BaseThemeProviderProps {
|
|
157
157
|
|
158
158
|
/** 配置带颜色模式切换功能的 MUI 主题 */
|
159
159
|
function ColorSchemeProvider({
|
160
|
-
children,
|
161
|
-
theme: themeInput,
|
162
|
-
prefer,
|
160
|
+
children = null,
|
161
|
+
theme: themeInput = undefined,
|
162
|
+
prefer = undefined,
|
163
163
|
disableBlockletTheme = false,
|
164
164
|
...rest
|
165
165
|
}: ThemeProviderProps) {
|
@@ -276,7 +276,12 @@ export interface ThemeProviderProps extends ColorSchemeProviderProps {
|
|
276
276
|
enableColorScheme?: boolean;
|
277
277
|
}
|
278
278
|
|
279
|
-
export default function ThemeProvider({
|
279
|
+
export default function ThemeProvider({
|
280
|
+
children = null,
|
281
|
+
prefer = undefined,
|
282
|
+
enableColorScheme = false,
|
283
|
+
...props
|
284
|
+
}: ThemeProviderProps) {
|
280
285
|
const { toggleMode } = useColorScheme();
|
281
286
|
|
282
287
|
if (enableColorScheme || prefer || !toggleMode) {
|
package/src/Theme/theme.ts
CHANGED
@@ -33,6 +33,7 @@ export function isTheme(obj: any): obj is Theme {
|
|
33
33
|
|
34
34
|
/** 是否是 UX Theme 对象 */
|
35
35
|
export function isUxTheme(obj: any): obj is Theme {
|
36
|
+
// @ts-expect-error
|
36
37
|
return isTheme(obj) && obj.__isUxTheme__ === true;
|
37
38
|
}
|
38
39
|
|
@@ -118,6 +119,7 @@ export function lazyCreateDefaultTheme(mode: PaletteMode) {
|
|
118
119
|
}
|
119
120
|
|
120
121
|
// 主要处理 overrides
|
122
|
+
// @ts-expect-error
|
121
123
|
const normalizeUserThemeOptions = ({ palette, components, overrides, ...rest }: UxThemeOptions) => {
|
122
124
|
const result: UxThemeOptions = {
|
123
125
|
palette,
|
@@ -132,6 +134,7 @@ const normalizeUserThemeOptions = ({ palette, components, overrides, ...rest }:
|
|
132
134
|
};
|
133
135
|
|
134
136
|
const defaultUxThemeOptions: UxThemeOptions = {
|
137
|
+
// @ts-expect-error
|
135
138
|
themeName: 'ArcBlock',
|
136
139
|
pageWidth: 'md',
|
137
140
|
disableBlockletTheme: false,
|
@@ -167,6 +170,7 @@ export const create = (...args: Array<UxThemeOptions | ((baseTheme: Theme) => Ux
|
|
167
170
|
deepmerge(acc, normalizeUserThemeOptions(typeof curr === 'function' ? curr(createBaseTheme()) : curr)),
|
168
171
|
normalizeUserThemeOptions(defaultUxThemeOptions)
|
169
172
|
);
|
173
|
+
// @ts-expect-error
|
170
174
|
const prefer = userThemeOptions.mode || userThemeOptions.palette?.mode || defaultPrefer;
|
171
175
|
const blockletThemeOptions = getBlockletThemeOptions(prefer);
|
172
176
|
const defaultThemeOptions = createDefaultThemeOptions(prefer);
|
@@ -188,6 +192,7 @@ export const create = (...args: Array<UxThemeOptions | ((baseTheme: Theme) => Ux
|
|
188
192
|
|
189
193
|
// 创建主题
|
190
194
|
const theme = _createTheme(mergedThemeOptions);
|
195
|
+
// @ts-expect-error
|
191
196
|
theme.__isUxTheme__ = true;
|
192
197
|
|
193
198
|
// 异步加载字体
|
package/src/Typography/index.tsx
CHANGED
@@ -10,7 +10,7 @@ interface DetailedCardProps extends Omit<UserCardProps, 'user'> {
|
|
10
10
|
}
|
11
11
|
|
12
12
|
// DetailedCard组件,根据infoType选择不同的卡片组件进行渲染
|
13
|
-
function DetailedCard(props: DetailedCardProps) {
|
13
|
+
function DetailedCard({ ...props }: DetailedCardProps) {
|
14
14
|
const { infoType = InfoType.Minimal } = props;
|
15
15
|
|
16
16
|
// 根据信息类型选择合适的卡片组件
|
@@ -11,7 +11,7 @@ interface DialogContainerProps {
|
|
11
11
|
/**
|
12
12
|
* 统一的卡片容器组件,处理常见的布局容器样式
|
13
13
|
*/
|
14
|
-
function DialogContainer({ children, sx }: DialogContainerProps) {
|
14
|
+
function DialogContainer({ children, sx = {} }: DialogContainerProps) {
|
15
15
|
// Box变体,用于Minimal和NameOnly类型卡片
|
16
16
|
const theme = useTheme();
|
17
17
|
return (
|
@@ -99,7 +99,7 @@ function LinkField({ value }: { value: string }) {
|
|
99
99
|
);
|
100
100
|
}
|
101
101
|
|
102
|
-
function BasicField({ field, value, children }: { field: string; value: string; children?: React.ReactNode }) {
|
102
|
+
function BasicField({ field, value, children = null }: { field: string; value: string; children?: React.ReactNode }) {
|
103
103
|
const Icon = IconMap[field as keyof typeof IconMap];
|
104
104
|
const theme = useTheme();
|
105
105
|
const isDark = theme.palette.mode === 'dark';
|
@@ -125,7 +125,7 @@ function BasicField({ field, value, children }: { field: string; value: string;
|
|
125
125
|
);
|
126
126
|
}
|
127
127
|
|
128
|
-
function BasicContent({ user, renderFields }: BasicContentProps) {
|
128
|
+
function BasicContent({ user, renderFields = undefined }: BasicContentProps) {
|
129
129
|
const fields = useCreation(() => {
|
130
130
|
return renderFields ?? ['bio', 'email', 'phone', 'location', 'timezone', 'link'];
|
131
131
|
}, [renderFields]);
|
@@ -15,7 +15,7 @@ interface MinimalContentProps extends UserCardProps {
|
|
15
15
|
shortenLabelProps?: UserCardProps['shortenLabelProps'];
|
16
16
|
}
|
17
17
|
|
18
|
-
function MinimalContent(props: MinimalContentProps) {
|
18
|
+
function MinimalContent({ ...props }: MinimalContentProps) {
|
19
19
|
const {
|
20
20
|
user,
|
21
21
|
showDid,
|
@@ -22,10 +22,10 @@ function TooltipAvatar({
|
|
22
22
|
user,
|
23
23
|
avatarSize,
|
24
24
|
shouldShowHoverCard,
|
25
|
-
renderCardContent,
|
26
|
-
tooltipTitle,
|
27
|
-
tooltipProps,
|
28
|
-
avatarProps,
|
25
|
+
renderCardContent = undefined,
|
26
|
+
tooltipTitle = undefined,
|
27
|
+
tooltipProps = undefined,
|
28
|
+
avatarProps = undefined,
|
29
29
|
onAvatarClick,
|
30
30
|
}: TooltipAvatarProps) {
|
31
31
|
const avatarElement = renderAvatar(
|
@@ -10,12 +10,17 @@ import { LOGIN_PROVIDER } from '../Util/constant';
|
|
10
10
|
|
11
11
|
export interface WalletOSIconProps {
|
12
12
|
loading?: false | true;
|
13
|
-
walletOS
|
13
|
+
walletOS: string;
|
14
14
|
provider?: string;
|
15
15
|
color?: string;
|
16
16
|
}
|
17
17
|
|
18
|
-
export default function WalletOSIcon({
|
18
|
+
export default function WalletOSIcon({
|
19
|
+
loading = false,
|
20
|
+
walletOS,
|
21
|
+
provider = 'wallet',
|
22
|
+
color = 'black',
|
23
|
+
}: WalletOSIconProps) {
|
19
24
|
if (loading) {
|
20
25
|
return <Icon icon={QuestionMarkRoundedIcon} style={{ color: 'transparent' }} />;
|
21
26
|
}
|