react-native-wiggle-box
v1.3.2
Published
A react native box that wiggles for attention
Downloads
9
Maintainers
Readme
react-native-wiggle-box
A box that wiggles for clickable attention
Contents
Install
yarn add react-native-wiggle-box
OR
npm install react-native-wiggle-box
Usage
import React from 'react'
import { View, Text, StyleSheet } from 'react-native'
import WiggleBox from 'react-native-wiggle-box'
class Example extends React.Component {
handleClick = () => console.log("You've just clicked on the box")
render() {
<View>
<WiggleBox
active={true}
handlePress={this.handleClick}
boxStyle={styles.boxContainer}
duration={200}
type={'wiggle'}
>
<Text>
I wiggle
</Text>
</WiggleBox>
<WiggleBox
active={true}
handlePress={this.handleClick}
boxStyle={styles.boxContainer}
type={'bounce'}
>
<Text>
I bounce
</Text>
</WiggleBox>
</View>
}
}
const styles = StyleSheet.create({
boxContainer: {
backgroundColor: "#3BD0F5",
height: 100,
width: 100,
alignItems: "center",
justifyContent: "center"
}
})
Props
Contribute
Contributions are welcome!
- Fork it.
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
Or open up a issue.
License
MIT