1.0.6 • Published 7 months ago
react-native-4tsistemas v1.0.6
react-native-4tsistemas
Getting started
$ npm install react-native-4tsistemas --save
Mostly automatic installation
$ react-native link react-native-4tsistemas
Manual installation
iOS
- In XCode, in the project navigator, right click
Libraries
➜Add Files to [your project's name]
- Go to
node_modules
➜react-native-4tsistemas
and addRNReactNative4tSistemas.xcodeproj
- In XCode, in the project navigator, select your project. Add
libRNReactNative4tSistemas.a
to your project'sBuild Phases
➜Link Binary With Libraries
- Run your project (
Cmd+R
)<
Android
- Open up
android/app/src/main/java/[...]/MainActivity.java
- Add
import com.reactlibrary.RNReactNative4tSistemasPackage;
to the imports at the top of the file - Add
new RNReactNative4tSistemasPackage()
to the list returned by thegetPackages()
method
- Append the following lines to
android/settings.gradle
:include ':react-native-4tsistemas' project(':react-native-4tsistemas').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-4tsistemas/android')
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:compile project(':react-native-4tsistemas')
Windows
- In Visual Studio add the
RNReactNative4tSistemas.sln
innode_modules/react-native-4tsistemas/windows/RNReactNative4tSistemas.sln
folder to their solution, reference from their app. - Open up your
MainPage.cs
app
- Add
using React.Native.Calendar_4t.RNReactNative4tSistemas;
to the usings at the top of the file - Add
new RNReactNative4tSistemasPackage()
to theList<IReactPackage>
returned by thePackages
method
Usage
import { View, Text, TouchableOpacity } from 'react-native'
import { AutoComplete, Calendar } from './lib/react-native-4tsistemas';
function App() {
return (
<View style={{ alignItems: 'center', justifyContent: 'center', width: '100%', height: '100%' }}>
<AutoComplete
data={[{"id":134, "titulo":"oi", "movel":"armario"}]} // ONDE VOCE CONFIGURA O DATA
ItemSearch={['titulo', 'movel', 'id']} // OS CAMPOS DO OBJETO QUE SERVIRA PARA FILTRAR
ItemValue={['id']} // ONDE VOCE CONFIGURA AS CHAVES QUE SERVIRA PARA MONTAR O VALUE ITEM
valueSelect={{"id":134, "titulo":"oi", "movel":"armario"}} // ONDE VOCE IRA CONFIGURAR O VALUE
onSelect={(e)=>console.log(e)} // ONDE RETORNA O ITEM SELECIONADO
/>
<Calendar onSelectDate={(e)=>console.log(e)} RenderButton={(props) => <TouchableOpacity onPress={() => {
props.setOpen()
}} style={{ width: 50, height: 50, backgroundColor: "green" }}>
</TouchableOpacity>} />
</View>
);
};
export default App
// TODO: What to do with the module?
RNReactNative4tSistemas;