Skip to content

Popup menu for react-native based on material android design and iOS ActionSheetIOS. There is no linking required as it is based on the Native android module and ActionSheetIOS.

Notifications You must be signed in to change notification settings

prabhat83/react-native-simple-popup-menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

react-native-simple-popup-menu

iPhone Android

Popup menu for react-native based on material android design and iOS ActionSheetIOS. There is no linking required as it is based on the Native android module and ActionSheetIOS.

Usage

Installation

npm i react-native-simple-popup-menu --save

Import

import SimplePopupMenu from 'react-native-simple-popup-menu'

API

const items = [
  { id: 'edit', label: 'Edit' },
  { id: 'delete', label: 'Delete' },
];

<SimplePopupMenu
    items={items}
    style={styles.button}
    onSelect={this.onMenuPress}
    onCancel={() => console.log('onCancel')}>
    <Text>Show menu</Text>
</SimplePopupMenu>

iOS

Support for additional cancel label

const items = [
  { id: 'edit', label: 'Edit' },
  { id: 'delete', label: 'Delete' },
];

<SimplePopupMenu
    items={items}
    style={styles.button}
    onSelect={this.onMenuPress}
    cancelLabel={'Canćel'}
    onCancel={() => console.log('onCancel')}>
    <Text>Show menu</Text>
</SimplePopupMenu>

Types

Flow is used as the typing system.

Exported Types

import type {
    PopupMenuItem,
} from 'react-native-simple-popup-menu'
type PopupMenuItem
{ id?: any, label: string }

About

Popup menu for react-native based on material android design and iOS ActionSheetIOS. There is no linking required as it is based on the Native android module and ActionSheetIOS.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published