Skip to content

Commit d7ad9d0

Browse files
author
Marco Cesarato
committed
First commit
1 parent 54a905b commit d7ad9d0

File tree

18 files changed

+546
-1
lines changed

18 files changed

+546
-1
lines changed

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto

.npmignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
example/
2+
npm-debug.log
3+
node_modules
4+
.DS_Store
5+
.idea

Example/.expo-shared/assets.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"f9155ac790fd02fadcdeca367b02581c04a353aa6d5aa84409a59f6804c87acd": true,
3+
"89ed26367cdb9b771858e026f2eb95bfdb90e5ae943e716575327ec325f39c44": true
4+
}

Example/.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
node_modules/**/*
2+
.expo/*
3+
npm-debug.*
4+
*.jks
5+
*.p12
6+
*.key
7+
*.mobileprovision
8+
*.orig.*
9+
web-build/
10+
web-report/
11+
yarn.lock

Example/.watchmanconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

Example/App.js

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
import React, {Component} from "react";
2+
import {StyleSheet, Text, ScrollView} from 'react-native';
3+
import TextInput from "react-native-input-validator";
4+
5+
export default class App extends Component {
6+
7+
constructor(props){
8+
super(props);
9+
this.state = {
10+
value: "Example of string",
11+
}
12+
}
13+
14+
render(){
15+
return (
16+
<ScrollView style={styles.container}>
17+
<Text style={styles.title}>Example{"\n"}react-native-input-validator</Text>
18+
<TextInput
19+
value={this.state.value}
20+
style={styles.input}
21+
type={"email"}
22+
onChangeText={(text) => {this.setState({value: text})}}>
23+
<Text>Default</Text>
24+
</TextInput>
25+
</ScrollView>
26+
);
27+
}
28+
}
29+
30+
const styles = StyleSheet.create({
31+
container: {
32+
flex: 1,
33+
backgroundColor: '#fff',
34+
padding: 20,
35+
paddingTop: 40,
36+
},
37+
title: {
38+
marginBottom: 40,
39+
fontSize: 30
40+
},
41+
input: {
42+
flex: 1,
43+
width: "auto",
44+
minWidth: 150,
45+
}
46+
});

Example/app.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"expo": {
3+
"name": "Example react-native-input-validator",
4+
"slug": "Example",
5+
"privacy": "public",
6+
"sdkVersion": "33.0.0",
7+
"platforms": [
8+
"ios",
9+
"android",
10+
"web"
11+
],
12+
"version": "1.0.0",
13+
"orientation": "portrait",
14+
"icon": "./assets/icon.png",
15+
"splash": {
16+
"image": "./assets/splash.png",
17+
"resizeMode": "contain",
18+
"backgroundColor": "#ffffff"
19+
},
20+
"updates": {
21+
"fallbackToCacheTimeout": 0
22+
},
23+
"assetBundlePatterns": [
24+
"**/*"
25+
],
26+
"ios": {
27+
"supportsTablet": true
28+
},
29+
"description": "",
30+
"githubUrl": "https://github.com/marcocesarato/react-native-input-validator/Example"
31+
}
32+
}

Example/assets/icon.png

1.07 KB
Loading

Example/assets/splash.png

7.01 KB
Loading

Example/babel.config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = function(api) {
2+
api.cache(true);
3+
return {
4+
presets: ['babel-preset-expo'],
5+
};
6+
};

0 commit comments

Comments
 (0)