// Copyright (c) Mysten Labs, Inc. // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 import type { WalletWithRequiredFeatures } from '@iota/wallet-standard'; import { Button } from '../../ui/Button.js'; import { Heading } from '../../ui/Heading.js'; import { Text } from '../../ui/Text.js'; import * as styles from './ConnectionStatus.css.js'; type ConnectionStatusProps = { selectedWallet: WalletWithRequiredFeatures; hadConnectionError: boolean; onRetryConnection: (selectedWallet: WalletWithRequiredFeatures) => void; }; export function ConnectionStatus({ selectedWallet, hadConnectionError, onRetryConnection, }: ConnectionStatusProps) { return (
{selectedWallet.icon && ( {`${selectedWallet.name} )}
Opening {selectedWallet.name}
{hadConnectionError ? ( Connection failed ) : ( Confirm connection in the wallet... )}
{hadConnectionError ? (
) : null}
); }