react-native-presenter
v0.0.10
Published
present component with animation
Downloads
9
Maintainers
Readme
Demo
Install
npm install react-native-presenter --save
Usage
import Presenter from 'react-native-presenter';
class YourComponent extends React.Component{
...
render(){
return(
<View>
...
<Presenter ref={(ref) => {this.presenter = ref}}>
//... content code
</Presenter>
</View>
);
}
}
Present
PresentationStyle
- 'from-top'
- 'from-right'
- 'from-bottom'
- 'from-left'
- 'cross-dissolve'
this.presenter.present(PresentationStyle);
Dismiss
this.presenter.dismiss();
Props
Prop | Type |Opt/Required| Default | Note | ----|----|----|----|---- animationRange|number| Optional|100| transform x or y animationDuration|number| Optional|250| animation durantion shadowColor|string| Optional|rgba(0,0,0,0.5)| shadow background color