react-native-wallet-chat-test
TypeScript icon, indicating that this package has built-in type declarations

0.1.79 • Public • Published

react-native-wallet-chat

Wallet Chat React Native Component Library

Installation

npm install react-native-wallet-chat

Usage

Add in your App.js

import { WalletChatProvider } from 'react-native-wallet-chat';

// ...

export const App = () => {
  return (
      <WalletChatProvider />
  )
}

Use the chat widget in any component

import { WalletChatWidget } from 'react-native-wallet-chat';

// ...
export const DashBoard = () => {
  return (
      <WalletChatWidget
            connectedWallet={
              address && activeConnector && chainId
                ? {
                    walletName: activeConnector?.name,
                    account: address,
                    chainId: chainId,
                    provider: provider
                  }
                : undefined
            }
      />
  )
}

Use chat with owner in any component

import { ChatWithOwner } from 'react-native-wallet-chat';

// ...
export const DashBoard = () => {
  return (
        <ChatWithOwner
          ownerAddress={address}
          render={
            <Icon
              style={{
                marginRight: 10,
                marginTop: 5
              }}
              name="whatsapp-1"
              size={25}
              color="gray"
            />
          }
      />
  )
}

PS:

Package still under active development

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT

Package Sidebar

Install

npm i react-native-wallet-chat-test

Weekly Downloads

2

Version

0.1.79

License

MIT

Unpacked Size

163 kB

Total Files

102

Last publish

Collaborators

  • cyber_kevin