ThirdwebProviderProps
interface ThirdwebProviderProps<TChains extends Array<Chain>> extends Omit< "supportedWallets" | "secretKey" | "signer" | "theme" > { locale: Locale; supportedWallets: Array<WalletConfig<any>>; theme: ThemeType;}
Locale that the app will be displayed in
By default it is set to en()
import { en } from "@thirdweb-dev/react-native"; <ThirdwebProvider locale={en()} />;
import { en } from "@thirdweb-dev/react-native"; <ThirdwebProvider locale={"en"} />;
Note that you can override the locales by passing in a custom locale object of type Locale
import { en } from "@thirdweb-dev/react-native"; const customLocale = { ...en(),"connect_wallet": "Connect Wallet"} <ThirdwebProviderlocale={customLocale}/>
Wallets that will be supported by the dApp
If no wallets are set, default wallets are used which is equivalent to the following:
[metamaskWallet(), rainbowWallet(), trustWallet()];
import { MetaMaskWallet, CoinbaseWallet,} from "@thirdweb-dev/react-native"; <ThirdwebProvider supportedWallets={[MetaMaskWallet, CoinbaseWallet]}/>;
Set the theme for all thirdweb components
By default it is set to "dark".
theme can be set to either "dark" or "light" or a custom theme object.
You can also import lightTheme
or darkTheme
functions from @thirdweb-dev/react-native
to use the default themes as base and overrides parts of it.
type theme = ThemeType;
import { darkTheme } from "@thirdweb-dev/react-native";const customTheme = darkTheme({ colors: { accentButtonColor: "black", },});