FuYaoDe / React Native Egg
react-native-egg make your react native app infinitely more fun !!
Stars: ✭ 254
Programming Languages
javascript
184084 projects - #8 most used programming language
react-native-egg
react-native-egg make your react native app infinitely more fun !!
Implementation simple gestures detection achieve trigger easter egg, You can also use it as a gesture switch.
Why ?
Just for fun !!
Hide some secret message.
Hide and Trigger some features.
Add it to your project
$ npm i react-native-egg --save
Basic usage
Use like a <View>
, but the children can not have onPress、onScroll props, like ScrollView
、ListView
、TouchableOpacity
.
import Egg from 'react-native-egg';
<Egg style={styles.container}
setps={'TTT'}
onCatch={() => {
Alert.alert('Version', '1.0.1');
}}
>
<Text>FuYaoDe</Text>
<Text>dan82625@gmail.com</Text>
</Egg>
Props
Prop | PropType | Default Value | Description |
---|---|---|---|
setps | string | UUDDLRLRTT | Trigger onCatch conditions,U is slide up,D is slide down,R is slide right,L is slide left,T is click. Max string length is 15. |
timeLimit | number | 2000 | combo limit time in milliseconds. |
onCatch | func | combo equal setps trigger onCatch. | |
onAction | (event) => {} | Any touch will trigger. event has the following U 、D 、R 、L 、T
|
|
touchOpacity | bool | false | make <Egg> look like <TouchableOpacity>
|
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].