React native services and components library
npm install throttles
or
yarn add throttles
Install these libraries to your local project
library | version tested |
---|---|
react-native-toasty | 1.0.1 |
@react-native-community/geolocation | 2.0.2 |
@react-native-mapbox-gl/maps | 8.1.0-rc.2 |
react-native-elements | 2.0.4 |
react-native-permissions | 2.1.5 |
@react-native-community/async-storage | 1.11.0 |
import {Toast} from "@coded-lines/throttles";
// ...
Toast.showToastShortCenter('message');
Toast.showToastLongCenter('message');
import { TermsAndConditions } from '@coded-lines/throttles';
// ...
function TnC() {
return (
<TermsAndConditions
text={TERMS_AND_CONDITIONS}
onAccept={() => console.log('ok')}
/>
);
}
Add this in App.tsx
to initialize mapbox
import { MapBoxClient } from '@coded-lines/throttles';
MapBoxClient.initMapbox(MAPBOX_GL_ACCESS_TOKEN);
Component usage example
import { MapDirections } from '@coded-lines/throttles';
function MwD() {
return <MapDirections storeLocation={STORE_LOCATION} />;
}
import { Contact } from '@coded-lines/throttles';
function Cnt() {
const onLocationClick = ...
return (
<Contact
onLocationClick={onLocationClick}
phoneNumber={PHONE_NUMBER}
locationText={LOCATION_TEXT}
/>
);
}
import { GdprList } from '@coded-lines/throttles';
function Gdpr() {
return <GdprList listData={getGdprListData().privacyCenter} />;
}
See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT