rn-chat-interface
v1.0.2
Published
A Chat UI for React Native
Downloads
25
Readme
rn-chat-interface
A Chat UI for React Native
Demo
Installation
yarn add rn-chat-interface
Usage
import * as React from 'react';
import { SafeAreaView } from 'react-native';
import { ChatInterface } from 'rn-chat-interface';
export default function App() {
const [visible, setVisible] = React.useState(true);
const closeChat = () => {
setVisible(false);
};
return (
<SafeAreaView style={{ flex: 1 }}>
<ChatInterface
isVisible={visible}
headerColor="cyan"
title="Chat"
onClose={closeChat}
/>
</SafeAreaView>
);
}
Props
- isVisible - Boolean value determines whether to show or not the component. Default is true.
- headerColor - Desired color of the top header.
- title - Text displayed in the top header.
- onClose - Expects a function that will be called upon pressing "Close".