@sawport/react-native-sdk
v0.1.0-alpha.6
Published
Sawport SDK
Downloads
4
Readme
@sawport/react-native-sdk
Sawport SDK
Installing single dependency
yarn add @sawport/react-native-sdk
Installing required peer dependencies
Dependencies are required for the sdk to function
yarn add react-native-audio-recorder-player react-native-calendars react-native-date-picker react-native-document-picker \
react-native-incall-manager react-native-localize react-native-svg react-native-webrtc
Peer Dependencies Setup
Make sure to follow setup instructions from the peer dependencies documentation sites. Most especially react-native-audio-recorder-player and react-native-webrtc
Usage
import {Widget, setConfig} from '@sawport/react-native-sdk';
setConfig({host: 'https://{DASHBOARD_DOMAIN}', baseURL: 'https://{DASHBOARD_DOMAIN}/api/v1/' });
function App() {
return <Widget user={AUTH_USER} projectId={PROJECT_ID} style={styles.widget} />;
}
API References
Widget
Sawport React Native SDK's widget component
Type
- React Component
Props
setConfig
Type
- Function(config)
Props
sawportConfig
The Sawport configuration object
Type
- Object
user
- name:
customer name to populate in the widget
- mobile:
customer phone number to populate in the widget
- email:
customer email to populate in the widget
projectId
The Enterprise's ID from the Dashboard
Contributing
See the contributing guide to learn how to contribute to the repository and the development workflow.
License
MIT