0.0.1 • Published 7 years ago
react-native-popups v0.0.1
react-native-popups
Installation
npm i -S react-native-popupsimport { Popup } from 'react-native-popups'Props
PopMenu
| Prop | Default | Type | Description |
|---|---|---|---|
| list | 0 | number | Right inset of separator |
| title | - | string | Title of PopMenu |
| visible | false | bool | PopMenu visible |
PopMenu.Item
| Prop | Default | Type | Description |
|---|---|---|---|
| style | {alignItems: 'center', justifyContent: 'center', padding: 15} | Style | Item's style |
| text | - | string | Text of the item |
| props | - | Props | React Native props |
Example
<PopMenu visible={visible} title="Menu Title" list={[
{text: 'Item 1', value: 1},
{text: 'Item 2', value: 2},
{text: 'Item 3', value: 3}
]} onClose={() => this.setState({visible: false})}
onItem={item => this.onItem(item)}/>
<PopMenu visible title="With Children">
<PopMenu.Item onPress={() => this.onItem(1)} text="Item 1"/>
<Text>Item 2<Text>
<Text>Item 3<Text>
</PopMenu>0.0.1
7 years ago