@commandbar/react-native
v1.0.4
Published
Copilot & HelpHub in React Native
Downloads
710
Maintainers
Readme
React Native CommandBar
Copilot & HelpHub in React Native
About
React Native CommandBar was built as a wrapper around CommandBarIOS and CommandBarAndroid repos and uses both as dependencies.
Installation
yarn add @commandbar/react-native
npm install @commandbar/react-native
Usage
Run the Example App
- Clone the repo:
git clone https://github.com/tryfoobar/react-native-commandbar && cd react-native-commandbar
- Install dependencies:
yarn
- Run the example:
yarn example ios
oryarn example android
Open HelpHub Bottom Sheet
import { Button, View } from 'react-native';
import { CommandBar } from '@commandbar/react-native';
const MyComponent = () => {
return (
<View>
<Button
title="Open"
onPress={() => CommandBar.openHelpHub({ orgId: 'your_org_id' })}
/>
</View>
);
};
Render a HelpHub View
import { Button, View } from 'react-native';
const MyComponent = () => {
return (
<View style={{ flex: 1 }}>
<HelpHubView orgId="your_org_id" />
</View>
);
};
Contributing
See the contributing guide to learn how to contribute to the repository and the development workflow.
License
MIT
Made with create-react-native-library