0.0.10 • Published 9 years ago
react-native-presenter v0.0.10
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 |