Skip to content

hwnprsd/react-native-pushable

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

react-native-pushable

Use a cool pushable element in your react-native app. Escape the ordinary! Embrace the crazy!

Installation

npm i -S react-native-pushable

Usage

import PushableElement from 'react-native-pushable';

export default class Appx extends Component {
  state = {
    push: 'Push Me'
  }
  render() {
    return (
      <View style={{ flex: 1, backgroundColor: '#eee', justifyContent: 'center', alignItems: 'center' }}>
        <PushableElement
          scale={0.90}
          style={{ backgroundColor: 'white', elevation: 5, padding: 10, borderRadius: 10, }}
          onPressIn={() => {this.setState({push: 'Pushhhh'})}}
          onPressOut={() => {this.setState({push: 'Push Me'})}}
        >
          <Text style={{ fontSize: 70 }}>{this.state.push}</Text>
        </PushableElement>
      </View>
    )
  }
}

Example

N|Solid

Props

Props description type isRequired defaultValue
scale controls the scale of the element when pushed. (1 being the normal size. Anything greater or lesser is multiplied with the original) number false 0.95

All touchableWithoutFeedback props are supported

License

MIT

About

A completely customizable pushable element. With all the TouchableWithoutFeedback props you'll ever need

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published