web3ui / web3uikit

Lightweight reusable Web3 UI components for dapps.
https://web3uikit.com
MIT License
1.72k stars 269 forks source link

ConnectWallet #846

Closed joseph-allen closed 2 years ago

joseph-allen commented 2 years ago

Currently ConnectWallet prompts for users to use Metamask, WalletConnect, Trust Wallet, MathWallet, TokenPoket and SafePal.

Is there a way to select only a few of these? I only want to support MetaMask, and in the future may wish to add custom providers.

AbhinavMV commented 2 years ago

Hey @joseph-allen

Currently, the button itself does not have that customization but I think you can do this with styled-components and some cool css hacks (not tested)

TY for using the kit

We are trying to create new components with Moralis2.0, and will keep this in mind while doing it 😄

joseph-allen commented 2 years ago

I am trying to hide them with something like

.test-wallet-modal-grid > div:not(:first-child) {
  display: none !important;
}

Though I don't think my global files are specific enough to override the components.

AbhinavMV commented 2 years ago

.test-wallet-modal-grid - this is not a classname it's an attribute called data-testid. You need to use attribute selector

[data-testid="test-wallet-modal-grid"] {
...styles
}

I am closing this issue since we will be considering this while developing the new version. TY for using the kit. You can ask your queries on moralis discord channel - web3uikit-help.

joseph-allen commented 2 years ago

Oh, thanks I am frazzled!

This worked if anybody else finds this while looking

[data-testid="test-wallet-modal-grid"]> div:not(:first-child) {
    display: none;
}