Skip to content

Commit e0cdad4

Browse files
committed
feat: 3.0.6 with synthetic onPress
1 parent 383b3f1 commit e0cdad4

File tree

63 files changed

+31011
-1219
lines changed

Some content is hidden

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

63 files changed

+31011
-1219
lines changed
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-manual-state/.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-manual-state/.gitattributes

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

example-manual-state/.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/
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-manual-state/.ruby-version

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

example-manual-state/App.tsx

Lines changed: 26 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
import React from "react";
2-
import { SafeAreaView, StyleSheet, Text, View } from "react-native";
3-
import BouncyCheckbox from "react-native-bouncy-checkbox";
4-
import RNBounceable from "@freakycoder/react-native-bounceable";
1+
import React from 'react';
2+
import {SafeAreaView, StyleSheet, Text, View} from 'react-native';
3+
// import BouncyCheckbox from 'react-native-bouncy-checkbox';
4+
import BouncyCheckbox from './build/dist/BouncyCheckbox';
5+
import RNBounceable from '@freakycoder/react-native-bounceable';
56

67
const App = () => {
78
let bouncyCheckboxRef: BouncyCheckbox | null = null;
@@ -11,26 +12,25 @@ const App = () => {
1112
<SafeAreaView
1213
style={{
1314
flex: 1,
14-
alignItems: "center",
15-
justifyContent: "center",
16-
}}
17-
>
15+
alignItems: 'center',
16+
justifyContent: 'center',
17+
}}>
1818
<View
1919
style={{
2020
height: 30,
2121
width: 150,
22-
alignItems: "center",
23-
justifyContent: "center",
22+
alignItems: 'center',
23+
justifyContent: 'center',
2424
borderRadius: 12,
25-
backgroundColor: checkboxState ? "#34eb83" : "#eb4034",
26-
}}
27-
>
25+
backgroundColor: checkboxState ? '#34eb83' : '#eb4034',
26+
}}>
2827
<Text
29-
style={{ color: "#fff" }}
30-
>{`Check Status: ${checkboxState.toString()}`}</Text>
28+
style={{
29+
color: '#fff',
30+
}}>{`Check Status: ${checkboxState.toString()}`}</Text>
3131
</View>
3232
<BouncyCheckbox
33-
style={{ marginTop: 16 }}
33+
style={{marginTop: 16}}
3434
ref={(ref: any) => (bouncyCheckboxRef = ref)}
3535
isChecked={checkboxState}
3636
text="Synthetic Checkbox"
@@ -43,15 +43,18 @@ const App = () => {
4343
style={{
4444
marginTop: 16,
4545
height: 50,
46-
width: "90%",
47-
backgroundColor: "#ffc484",
46+
width: '90%',
47+
backgroundColor: '#ffc484',
4848
borderRadius: 12,
49-
alignItems: "center",
50-
justifyContent: "center",
49+
alignItems: 'center',
50+
justifyContent: 'center',
5151
}}
52-
onPress={() => bouncyCheckboxRef?.onPress()}
53-
>
54-
<Text style={{ color: "#fff" }}>Synthetic Checkbox Press</Text>
52+
onPress={() => {
53+
console.log(bouncyCheckboxRef?.onPress());
54+
// bouncyCheckboxRef?.current.onPress();
55+
// bouncyCheckboxRef?.onPress();
56+
}}>
57+
<Text style={{color: '#fff'}}>Synthetic Checkbox Press</Text>
5558
</RNBounceable>
5659
</SafeAreaView>
5760
);

example-manual-state/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-manual-state/_editorconfig

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

example-manual-state/_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)