Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions packages/ui/react-ui/src/BaseWalletConnectionButton.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
import type { WalletName } from '@solana/wallet-adapter-base';
import React from 'react';
import type { ButtonProps } from './Button.js';
import { Button } from './Button.js';
import { WalletIcon } from './WalletIcon.js';

type Props = React.ComponentProps<typeof Button> & {
type Props = ButtonProps & {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did this type change because eslint/prop-types was complaining that className was not among the props, ostensibly this is a bug in the rule. I'm not sure this prop-types rule does anything if you're using strict ts anyway.

walletIcon?: string;
walletName?: WalletName;
};

export function BaseWalletConnectionButton({ walletIcon, walletName, ...props }: Props) {
export function BaseWalletConnectionButton({ walletIcon, walletName, className, ...props }: Props) {
return (
<Button
{...props}
className="wallet-adapter-button-trigger"
className={'wallet-adapter-button-trigger ' + (className ?? '')}
startIcon={
walletIcon && walletName ? (
<WalletIcon wallet={{ adapter: { icon: walletIcon, name: walletName } }} />
Expand Down