@debox-global/react
v0.0.3-alpha.0
Published
...
Downloads
6
Readme
@debox-global/react
...
Getting Started
- Need to use
NPM
npm install @debox-global/react
- Initialize DeBoxChat
Not Support SSR
import { DeBoxChat } from '@debox-global/react'
const APP = () => {
return (
<DeBoxChat
config={{
dao: {
contractAddress: '0x...',
chainId: 1 | 56,
source: 0 | 1
},
projectId: 'DeBox projectId ...',
themeMode: 'dark' | 'light',
themeColor: 'default' | 'green'
}}
client={window.ethereum} // Currently only standard providers are supported. (For example: metamask, walletconnect...)
/>
)
}
API
useLogin
import { useLogin } from '@debox-global/react'
const {
data: { chainId, address, isConnected, ... },
login,
logout
} = useLogin()
useTheme
import { useTheme } from '@debox-global/react'
const { theme, setTheme } = useTheme()
Examples
...