Skip to main content
function ExportWalletModal(props: ExportWalletModalProps): Element;
A export wallet modal component that wraps the ExportWallet component.

Parameters

ParameterTypeDescription
propsExportWalletModalPropsThe props for the ExportWalletModal component.

Returns

Element The ExportWalletModal component.

See

Examples

// Render the ExportWalletModal component with an EVM address
function ExportWalletModalExample() {
  const { evmAddress } = useEvmAddress();
  return (
    <ExportWalletModal address={evmAddress} />
  );
}
// Render the ExportWalletModal component with a Solana address
function ExportWalletModalExample() {
  const { solanaAddress } = useSolanaAddress();
  return (
    <ExportWalletModal address={solanaAddress} />
  );
}
// Render the ExportWalletModal component with a custom label for the trigger button
function ExportWalletModalExample() {
  const { solanaAddress } = useSolanaAddress();
  return (
    <ExportWalletModal address={solanaAddress}>
      <ExportWalletModalTrigger label="Export Solana wallet" />
    </ExportWalletModal>
  );
}
// Render the ExportWalletModal component with a custom button as the trigger
function ExportWalletModalExample() {
  const { solanaAddress } = useSolanaAddress();
  return (
    <ExportWalletModal address={solanaAddress}>
      <button type="button">Export Solana wallet</button>
    </ExportWalletModal>
  );
}
// Render the ExportWalletModal component with customized content
function ExportWalletModalExample() {
  const { solanaAddress } = useSolanaAddress();
  return (
    <ExportWalletModal address={solanaAddress}>
      <ExportWalletModalTrigger />
      <ExportWalletModalContent>
        <ExportWallet address={solanaAddress}>
          <div className="header">
            <ExportWalletModalTitle />
            <ExportWalletModalClose />
          </div>
          <div className="content">
            <ExportWalletWarning />
            <ExportWalletCopyAddress />
            <ExportWalletCopyKeyButton />
            <p className="help-text">
              Your private key gives full control of your wallet.
              Store it safely and never share it with anyone.
            </p>
          </div>
        </ExportWallet>
      </ExportWalletModalContent>
    </ExportWalletModal>
  );
}