1.0.7 • Published 3 years ago

rn-tony-animated-pressable v1.0.7

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

React Native Tony Animated Pressable

A custom React Native package with an aweful name which animates onPressIn and onPressOut of the React Native Pressable component.

Installation

Run

yarn add rn-tony-animated-pressable

Or

npm install rn-tony-animated-pressable

Usage

import RNTAnimatedPressable from 'rn-tony-animated-pressable'
<RNTAnimatedPressable
   scaleValue={0.9}
   onPress={() => {
     //do something
   }}>
     <Text>Press Me!</Text>
</RNTAnimatedPressable>

Props

Inherits PressableProps

PropertyTypeDefault valueDescription
onPressPressEventCalled when the touch is released.
scaleValueNumber0.9Specifies the value to which the animated view is scaled to.
frictionNumber7Controls "bounciness"/overshoot of animated view.
tensionNumber40Controls speed of the animation.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT