Skip to content

Jeepeng/react-native-root-views

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-native-root-views

Installation

npm install react-native-root-views --save

Usage

import { ActionSheet, Loading } from 'react-native-root-views';

// show loading
Loading.show();

// hide loading
Loading.hide();

ActionSheet.showActionSheetWithOptions(
  {
    options: ['拍照', '从相册选择', '取消'],
    cancelButtonIndex: 2,
    tintColor: '#2b3d54',
  },
  buttonIndex => {
    // do something
  },
);

API

ActionSheet

Same API as ActionSheetIOS

Loading

show()

show loading

hide()

hide loading