Skip to content

Commit 7c1e3a0

Browse files
committed
chore: new and upgraded example with customizable shown
1 parent e7a16a5 commit 7c1e3a0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+22589
-9119
lines changed

example/.bundle/config

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
BUNDLE_PATH: "vendor/bundle"
2+
BUNDLE_FORCE_RUBY_PLATFORM: 1

example/.editorconfig

Lines changed: 0 additions & 3 deletions
This file was deleted.

example/.eslintrc.js

Lines changed: 11 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,16 @@
11
module.exports = {
22
root: true,
3-
extends: "@react-native-community",
4-
parser: "@typescript-eslint/parser",
5-
plugins: ["import", "eslint-plugin-import", "@typescript-eslint"],
6-
settings: {
7-
"import/resolver": {
8-
node: {
9-
extensions: [
10-
".js",
11-
".jsx",
12-
".ts",
13-
".tsx",
14-
".d.ts",
15-
".android.js",
16-
".android.jsx",
17-
".android.ts",
18-
".android.tsx",
19-
".ios.js",
20-
".ios.jsx",
21-
".ios.ts",
22-
".ios.tsx",
23-
".web.js",
24-
".web.jsx",
25-
".web.ts",
26-
".web.tsx",
27-
],
3+
extends: '@react-native-community',
4+
parser: '@typescript-eslint/parser',
5+
plugins: ['@typescript-eslint'],
6+
overrides: [
7+
{
8+
files: ['*.ts', '*.tsx'],
9+
rules: {
10+
'@typescript-eslint/no-shadow': ['error'],
11+
'no-shadow': 'off',
12+
'no-undef': 'off',
2813
},
2914
},
30-
},
31-
rules: {
32-
quotes: [
33-
"error",
34-
"double",
35-
{
36-
avoidEscape: true,
37-
},
38-
],
39-
"max-len": ["error", 120],
40-
"@typescript-eslint/ban-ts-comment": 2,
41-
"@typescript-eslint/no-explicit-any": 2,
42-
"@typescript-eslint/explicit-module-boundary-types": 0,
43-
"react/jsx-filename-extension": ["error", { extensions: [".tsx"] }],
44-
"react-native/no-unused-styles": 2,
45-
"react-native/split-platform-components": 2,
46-
"react-native/no-inline-styles": 0,
47-
"react-native/no-color-literals": 0,
48-
"react-native/no-raw-text": 0,
49-
"import/no-extraneous-dependencies": 2,
50-
"import/extensions": ["error", "never", { svg: "always" }],
51-
"import/no-named-as-default-member": 2,
52-
"import/order": ["error", { "newlines-between": "always" }],
53-
"import/no-duplicates": 2,
54-
"import/no-useless-path-segments": 2,
55-
"import/no-cycle": 2,
56-
"import/prefer-default-export": 0,
57-
"import/no-anonymous-default-export": 0,
58-
"import/named": 0,
59-
"@typescript-eslint/no-empty-interface": 0,
60-
"import/namespace": 0,
61-
"import/default": 0,
62-
"import/no-named-as-default": 0,
63-
"import/no-unused-modules": 0,
64-
"import/no-deprecated": 0,
65-
"@typescript-eslint/indent": 0,
66-
"react-hooks/rules-of-hooks": 2,
67-
"react-hooks/exhaustive-deps": [
68-
"error",
69-
{ additionalHooks: "(useMemoOne)" },
70-
],
71-
"jest/no-identical-title": 2,
72-
"jest/valid-expect": 2,
73-
camelcase: 2,
74-
"prefer-destructuring": 2,
75-
"no-nested-ternary": 2,
76-
},
15+
],
7716
};

example/.gitattributes

Lines changed: 0 additions & 3 deletions
This file was deleted.

example/.gitignore

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ DerivedData
2020
*.hmap
2121
*.ipa
2222
*.xcuserstate
23+
ios/.xcode.env.local
2324

2425
# Android/IntelliJ
2526
#
@@ -28,6 +29,8 @@ build/
2829
.gradle
2930
local.properties
3031
*.iml
32+
*.hprof
33+
.cxx/
3134

3235
# node.js
3336
#
@@ -48,12 +51,14 @@ buck-out/
4851
# For more information about the recommended setup visit:
4952
# https://docs.fastlane.tools/best-practices/source-control/
5053

51-
*/fastlane/report.xml
52-
*/fastlane/Preview.html
53-
*/fastlane/screenshots
54+
**/fastlane/report.xml
55+
**/fastlane/Preview.html
56+
**/fastlane/screenshots
57+
**/fastlane/test_output
5458

5559
# Bundle artifact
5660
*.jsbundle
5761

58-
# CocoaPods
62+
# Ruby / CocoaPods
5963
/ios/Pods/
64+
/vendor/bundle/

example/.prettierrc.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module.exports = {
2+
arrowParens: 'avoid',
3+
bracketSameLine: true,
4+
bracketSpacing: false,
5+
singleQuote: true,
6+
trailingComma: 'all',
7+
};

example/.ruby-version

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

example/App.tsx

Lines changed: 32 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,78 +1,71 @@
1-
/**
2-
* Sample React Native App
3-
* https://github.com/facebook/react-native
4-
*
5-
* Generated with the TypeScript template
6-
* https://github.com/react-native-community/react-native-template-typescript
7-
*
8-
* @format
9-
*/
10-
11-
import React from "react";
1+
import React from 'react';
122
import {
13-
Alert,
143
Text,
154
View,
165
TouchableOpacity,
176
Image,
187
Dimensions,
198
SafeAreaView,
20-
} from "react-native";
21-
import InteractiveTextInput from "react-native-text-input-interactive";
9+
} from 'react-native';
10+
import InteractiveTextInput from 'react-native-text-input-interactive';
2211

23-
const { width: ScreenWidth } = Dimensions.get("screen");
12+
const {width: ScreenWidth} = Dimensions.get('screen');
2413

2514
const App = () => {
2615
const renderHeader = () => (
27-
<View style={{ marginTop: 24 }}>
28-
<Text style={{ color: "#2a41cb", fontWeight: "bold", fontSize: 32 }}>
16+
<View style={{marginTop: 24}}>
17+
<Text style={{color: '#2a41cb', fontWeight: 'bold', fontSize: 32}}>
2918
Welcome Back 👋
3019
</Text>
31-
<Text style={{ color: "#8e9496", letterSpacing: 1, marginTop: 8 }}>
20+
<Text style={{color: '#8e9496', letterSpacing: 1, marginTop: 8}}>
3221
I am so happy to see you. You can continue to login for manage your
3322
finance
3423
</Text>
3524
</View>
3625
);
3726

3827
const renderTextInputs = () => (
39-
<View style={{ marginTop: 52 }}>
40-
<InteractiveTextInput textInputStyle={{ width: ScreenWidth * 0.88 }} />
28+
<View style={{marginTop: 52}}>
29+
<InteractiveTextInput textInputStyle={{width: ScreenWidth * 0.88}} />
4130
<View
4231
style={{
4332
marginTop: 24,
44-
flexDirection: "row",
45-
alignItems: "center",
46-
justifyContent: "space-between",
33+
flexDirection: 'row',
34+
alignItems: 'center',
35+
justifyContent: 'space-between',
4736
}}
4837
>
4938
<InteractiveTextInput
5039
placeholder="Password"
5140
secureTextEntry
5241
enableIcon
53-
textInputStyle={{ width: ScreenWidth * 0.7 }}
54-
iconImageSource={require("./assets/visibility-button.png")}
42+
textInputStyle={{
43+
width: ScreenWidth * 0.7,
44+
backgroundColor: '#ccc',
45+
fontFamily: 'Staatliches-Regular',
46+
}}
47+
iconImageSource={require('./assets/visibility-button.png')}
5548
onIconPress={() => {}}
5649
/>
5750
<TouchableOpacity
5851
style={{
5952
height: 50,
6053
width: 50,
61-
alignItems: "center",
62-
justifyContent: "center",
63-
borderColor: "#2a41cb",
54+
alignItems: 'center',
55+
justifyContent: 'center',
56+
borderColor: '#2a41cb',
6457
borderWidth: 1,
6558
borderRadius: 8,
6659
}}
6760
>
6861
<Image
69-
source={require("./assets/fingerprint.png")}
70-
style={{ height: 25, width: 25, tintColor: "#2a41cb" }}
62+
source={require('./assets/fingerprint.png')}
63+
style={{height: 25, width: 25, tintColor: '#2a41cb'}}
7164
/>
7265
</TouchableOpacity>
7366
</View>
74-
<TouchableOpacity style={{ marginLeft: "auto", marginTop: 16 }}>
75-
<Text style={{ color: "#2a41cb", fontWeight: "500" }}>
67+
<TouchableOpacity style={{marginLeft: 'auto', marginTop: 16}}>
68+
<Text style={{color: '#2a41cb', fontWeight: '500'}}>
7669
Forgot Password?
7770
</Text>
7871
</TouchableOpacity>
@@ -84,29 +77,29 @@ const App = () => {
8477
style={{
8578
height: 50,
8679
width: ScreenWidth * 0.88,
87-
backgroundColor: "#2a41cb",
80+
backgroundColor: '#2a41cb',
8881
marginTop: ScreenWidth * 0.5,
8982
borderRadius: 12,
90-
alignItems: "center",
91-
justifyContent: "center",
83+
alignItems: 'center',
84+
justifyContent: 'center',
9285
shadowRadius: 8,
9386
shadowOpacity: 0.3,
94-
shadowColor: "#2a41cb",
87+
shadowColor: '#2a41cb',
9588
shadowOffset: {
9689
width: 0,
9790
height: 5,
9891
},
9992
}}
10093
>
101-
<Text style={{ fontWeight: "bold", color: "#fff" }}>Login</Text>
94+
<Text style={{fontWeight: 'bold', color: '#fff'}}>Login</Text>
10295
</TouchableOpacity>
10396
);
10497

10598
const renderDontHaveAccountButton = () => (
10699
<TouchableOpacity
107-
style={{ marginTop: ScreenWidth * 0.4, alignItems: "center" }}
100+
style={{marginTop: ScreenWidth * 0.4, alignItems: 'center'}}
108101
>
109-
<Text style={{ fontWeight: "700" }}>Don't have an account</Text>
102+
<Text style={{fontWeight: '700'}}>Don't have an account</Text>
110103
</TouchableOpacity>
111104
);
112105

example/Gemfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
source 'https://rubygems.org'
2+
3+
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
4+
ruby '2.7.5'
5+
6+
gem 'cocoapods', '~> 1.11', '>= 1.11.2'

example/_node-version

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

0 commit comments

Comments
 (0)