UNPKG

@pushchain/ui-kit

Version:

Push Chain is a true universal L1 that is 100% EVM compatible. It allows developers to deploy once and make their apps instantly compatible with users from all other L1s (Ethereum, Solana, etc) with zero on-chain code change.

78 lines (77 loc) 2.58 kB
import { CHAIN, PUSH_NETWORK } from '@pushchain/core/src/lib/constants/enums'; import { PushUI } from '../constants'; import { ThemeOverrides } from '../styles/token'; import { ToastPosition } from '../components/PushWalletToast'; export type LoginMethodConfig = { email?: boolean; google?: boolean; phone?: boolean; socials?: { discord?: boolean; github?: boolean; x?: boolean; bluesky?: boolean; }; wallet?: { enabled?: boolean; chains?: (typeof PushUI.CONSTANTS.CHAIN)[keyof typeof PushUI.CONSTANTS.CHAIN][]; excludedChains?: (typeof PushUI.CONSTANTS.CHAIN)[keyof typeof PushUI.CONSTANTS.CHAIN][]; }; appPreview?: boolean; }; export type ChainConfig = { rpcUrls?: Partial<Record<CHAIN, string[]>>; blockExplorers?: Partial<Record<CHAIN, string[]>>; printTraces?: boolean; }; export type ProviderConfigProps = { uid?: string; network: PUSH_NETWORK; rpcUrl?: string; login?: LoginMethodConfig; modal?: ModalProps; chainConfig?: ChainConfig; version?: 4 | 5; toast?: ToastProps; }; export type AppMetadata = { title?: string; logoUrl?: string; description?: string; }; export type ModalProps = { /** * “split” shows the preview pane side-by-side with the iframe * “simple” shows only the iframe (no preview) */ loginLayout?: typeof PushUI.CONSTANTS.LOGIN.LAYOUT.SPLIT | typeof PushUI.CONSTANTS.LOGIN.LAYOUT.SIMPLE; /** if true (and `app` is provided), show the preview pane in the wrapper */ appPreview?: boolean; /** CSS background-image for wrapper or preview pane */ bgImage?: string; /** when connected, how the account menu appears */ connectedLayout?: typeof PushUI.CONSTANTS.CONNECTED.LAYOUT.FULL | typeof PushUI.CONSTANTS.CONNECTED.LAYOUT.HOVER; connectedInteraction?: typeof PushUI.CONSTANTS.CONNECTED.INTERACTION.INTERACTIVE | typeof PushUI.CONSTANTS.CONNECTED.INTERACTION.BLUR; }; export type ThemeMode = typeof PushUI.CONSTANTS.THEME.LIGHT | typeof PushUI.CONSTANTS.THEME.DARK; export type PushWalletProviderProps = { children: React.ReactNode; config: ProviderConfigProps; app?: AppMetadata; themeMode?: ThemeMode; themeOverrides?: ThemeOverrides; }; export type ModalAppDetails = { logoURL?: string; title?: string; description?: string; }; export type WalletAppDetails = { logoURL?: string; title?: string; description?: string; }; export type ToastProps = { hidden?: boolean; position?: ToastPosition; };