0.0.10 • Published 9 years ago

react-native-presenter v0.0.10

Weekly downloads
2
License
ISC
Repository
-
Last release
9 years ago

Demo

Imgur

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

PropTypeOpt/RequiredDefaultNote
animationRangenumberOptional100transform x or y
animationDurationnumberOptional250animation durantion
shadowColorstringOptionalrgba(0,0,0,0.5)shadow background color