1.0.2 • Published 7 years ago

touchable-elastic v1.0.2

Weekly downloads
3
License
ISC
Repository
github
Last release
7 years ago

touchable-elastic

A React Native component that shows feedback via scale transform animations

npm.io

Install

npm install --save touchable-elastic

Import

import TouchableElastic from 'touchable-elastic';

Usage

render() {
  // Treat TouchableElastic like TouchableOpacity.
  // TouchableElastic centers children horizontally and vertically.
  return (
    <View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
      <TouchableElastic
        style={{ borderWidth: 1, height: 70, width: 70, borderRadius: 35 }}
        onPressIn={() => console.log('hello')}
        onPressOut={() => console.log('good')}
        onPress={() => console.log('sir')}
        hitSlop={{ top: 9, right: 9, bottom: 9, left: 9 }}

        // these props are specific to this package
        elasticity={2}
        shrinkage={0.5}
        >
        <Text>Hello World</Text>
      </TouchableElastic>
    </View>
  );
}
1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago

0.0.1

7 years ago