Skip to content

Commit 5c0e7be

Browse files
committed
chore: new example with upgraded dependencies
1 parent 1c1d01a commit 5c0e7be

Some content is hidden

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

53 files changed

+29316
-6983
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: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,16 @@
11
module.exports = {
22
root: true,
33
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',
13+
},
14+
},
15+
],
416
};

example/.gitattributes

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

example/.gitignore

Lines changed: 8 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,7 @@ build/
2829
.gradle
2930
local.properties
3031
*.iml
32+
*.hprof
3133

3234
# node.js
3335
#
@@ -48,12 +50,14 @@ buck-out/
4850
# For more information about the recommended setup visit:
4951
# https://docs.fastlane.tools/best-practices/source-control/
5052

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

5558
# Bundle artifact
5659
*.jsbundle
5760

58-
# CocoaPods
61+
# Ruby / CocoaPods
5962
/ios/Pods/
63+
/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: 51 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,165 +1,162 @@
1-
import React from "react";
2-
import { View, Text, StatusBar, SafeAreaView, Pressable } from "react-native";
3-
import AppleHeader from "react-native-apple-header";
4-
import BottomSearchBar from "react-native-bottom-search-bar";
5-
import BouncyCheckbox from "react-native-bouncy-checkbox";
6-
import MultipleCheckboxes from "./multipleCheckboxes/multiple-checkboxes.component";
1+
import React from 'react';
2+
import {View, Text, StatusBar, SafeAreaView, Pressable} from 'react-native';
3+
import AppleHeader from 'react-native-apple-header';
4+
import BottomSearchBar from 'react-native-bottom-search-bar';
5+
import BouncyCheckbox from './lib/BouncyCheckbox';
76

87
export default class App extends React.Component {
98
render() {
109
return (
11-
<View style={{ flex: 1 }}>
10+
<View style={{flex: 1}}>
1211
<StatusBar barStyle="dark-content" />
13-
<SafeAreaView style={{ flex: 1 }}>
12+
<SafeAreaView style={{flex: 1}}>
1413
<AppleHeader />
15-
<View style={{ margin: 16 }}>
16-
<MultipleCheckboxes />
17-
<View style={{ margin: 8 }}>
14+
<View style={{margin: 16}}>
15+
<View style={{margin: 8}}>
1816
<BouncyCheckbox
1917
size={25}
2018
fillColor="red"
2119
TouchableComponent={Pressable}
22-
textStyle={{ fontFamily: "JosefinSans-Regular" }}
23-
iconStyle={{ borderColor: "red" }}
20+
textStyle={{fontFamily: 'JosefinSans-Regular'}}
21+
iconStyle={{borderColor: 'red'}}
22+
disableText={false}
2423
unfillColor="#FFFFFF"
2524
text="Custom Checkbox with Pressable Component"
2625
onPress={(isChecked: boolean) => {}}
2726
/>
2827
</View>
29-
<View style={{ margin: 8 }}>
28+
<View style={{margin: 8}}>
3029
<BouncyCheckbox
3130
disabled
3231
isChecked={false}
33-
iconStyle={{ borderColor: "blue", borderRadius: 10 }}
34-
textStyle={{ fontFamily: "JosefinSans-Regular" }}
32+
iconStyle={{borderColor: 'blue', borderRadius: 10}}
33+
textStyle={{fontFamily: 'JosefinSans-Regular'}}
3534
unfillColor="white"
3635
text="Custom Disabled Checkbox Example"
3736
onPress={(isChecked: boolean) => {}}
3837
/>
3938
</View>
40-
<View style={{ margin: 8 }}>
39+
<View style={{margin: 8}}>
4140
<BouncyCheckbox
4241
text="Call my mom 😇"
43-
textStyle={{ fontFamily: "JosefinSans-Regular" }}
42+
textStyle={{fontFamily: 'JosefinSans-Regular'}}
4443
onPress={(checked: boolean) => {}}
4544
/>
4645
</View>
47-
<View style={{ margin: 8 }}>
46+
<View style={{margin: 8}}>
4847
<BouncyCheckbox
4948
isChecked
5049
text="Get groceries"
51-
textStyle={{ fontFamily: "JosefinSans-Regular" }}
50+
textStyle={{fontFamily: 'JosefinSans-Regular'}}
5251
onPress={(isChecked: boolean) => {}}
5352
/>
5453
</View>
55-
<View style={{ margin: 8 }}>
54+
<View style={{margin: 8}}>
5655
<BouncyCheckbox
5756
isChecked
5857
text="Pay the bills"
59-
textStyle={{ fontFamily: "JosefinSans-Regular" }}
58+
textStyle={{fontFamily: 'JosefinSans-Regular'}}
6059
onPress={(isChecked: boolean) => {}}
6160
/>
6261
</View>
63-
<View style={{ margin: 8 }}>
62+
<View style={{margin: 8}}>
6463
<BouncyCheckbox
6564
text="Take out of the trash 💩"
66-
textStyle={{ fontFamily: "JosefinSans-Regular" }}
65+
textStyle={{fontFamily: 'JosefinSans-Regular'}}
6766
onPress={(isChecked: boolean) => {}}
6867
/>
6968
</View>
70-
<View style={{ margin: 8 }}>
69+
<View style={{margin: 8}}>
7170
<BouncyCheckbox
71+
disableText={false}
7272
text="Buy tickets for concert 🎉 🎊"
73-
textStyle={{ fontFamily: "JosefinSans-Regular" }}
73+
textStyle={{fontFamily: 'JosefinSans-Regular'}}
7474
onPress={(isChecked: boolean) => {}}
7575
/>
7676
</View>
77-
<View style={{ margin: 8 }}>
77+
<View style={{margin: 8}}>
7878
<BouncyCheckbox
7979
isChecked
8080
text="Try new gym routine"
8181
textStyle={{
82-
fontFamily: "JosefinSans-Regular",
83-
color: "red",
84-
textDecorationLine: "none",
82+
fontFamily: 'JosefinSans-Regular',
83+
color: 'red',
84+
textDecorationLine: 'none',
8585
}}
8686
onPress={(isChecked: boolean) => {}}
8787
/>
8888
</View>
89-
<View style={{ margin: 8 }}>
89+
<View style={{margin: 8}}>
9090
<BouncyCheckbox
9191
isChecked
9292
text="Do a load of laundry"
93-
textStyle={{ fontFamily: "JosefinSans-Regular" }}
93+
textStyle={{fontFamily: 'JosefinSans-Regular'}}
9494
onPress={(isChecked: boolean) => {}}
9595
/>
9696
</View>
9797
</View>
9898
<View
9999
style={{
100100
marginTop: 16,
101-
}}
102-
>
101+
}}>
103102
<Text
104103
style={{
105104
marginLeft: 24,
106105
fontSize: 24,
107-
fontWeight: "700",
108-
fontFamily: "JosefinSans-Regular",
109-
}}
110-
>
106+
fontWeight: '700',
107+
fontFamily: 'JosefinSans-Regular',
108+
}}>
111109
Checkbox Only
112110
</Text>
113111
<View
114112
style={{
115113
marginTop: 16,
116-
width: "100%",
117-
flexDirection: "row",
118-
justifyContent: "space-evenly",
119-
}}
120-
>
114+
width: '100%',
115+
flexDirection: 'row',
116+
justifyContent: 'space-evenly',
117+
}}>
121118
<BouncyCheckbox
122119
size={50}
123120
isChecked
124-
iconImageStyle={{ width: 18, height: 18 }}
121+
iconImageStyle={{width: 18, height: 18}}
125122
disableText
126123
onPress={() => {}}
127124
/>
128125
<BouncyCheckbox
129126
disableText
130127
fillColor="#f54b42"
131128
size={50}
132-
iconImageStyle={{ width: 18, height: 18 }}
133-
iconStyle={{ borderColor: "#f54b42" }}
129+
iconImageStyle={{width: 18, height: 18}}
130+
iconStyle={{borderColor: '#f54b42'}}
134131
onPress={() => {}}
135132
/>
136133
<BouncyCheckbox
137134
isChecked
138135
disableText
139136
fillColor="#4287f5"
140137
size={50}
141-
iconImageStyle={{ width: 18, height: 18 }}
142-
iconStyle={{ borderColor: "#4287f5" }}
138+
iconImageStyle={{width: 18, height: 18}}
139+
iconStyle={{borderColor: '#4287f5'}}
143140
onPress={() => {}}
144141
/>
145142
<BouncyCheckbox
146-
ref={(touchable) => (this.touchable = touchable)}
143+
ref={touchable => (this.touchable = touchable)}
147144
disableText
148145
fillColor="#9342f5"
149146
size={50}
150-
iconImageStyle={{ width: 18, height: 18 }}
151-
iconStyle={{ borderColor: "#9342f5" }}
147+
iconImageStyle={{width: 18, height: 18}}
148+
iconStyle={{borderColor: '#9342f5'}}
152149
onPress={() => {
153-
alert("hello");
150+
alert('hello');
154151
}}
155152
/>
156153
<BouncyCheckbox
157154
isChecked
158155
disableText
159156
fillColor="green"
160157
size={50}
161-
iconImageStyle={{ width: 18, height: 18 }}
162-
iconStyle={{ borderColor: "green" }}
158+
iconImageStyle={{width: 18, height: 18}}
159+
iconStyle={{borderColor: 'green'}}
163160
onPress={() => {
164161
this.touchable?.props.onPress();
165162
}}

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'

0 commit comments

Comments
 (0)