0.0.17 • Published 7 years ago

react-native-popover-typescript v0.0.17

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

React Native Popover (typescript)

npm version

Install

npm install --save react-native-popover-typescript

or

yarn add react-native-popover-typescript

Usage example

import React from 'react';
import {View, Text, Image} from 'react-native';
import Popover from 'react-native-popover-typescript';

class App extends React.PureComponent {
	options: [{
		title: 'Option 1',
		id: 0,
		icon: <Image
			style={{width: 18, height: 18}}
			source={{uri: 'https://facebook.github.io/react-native/docs/assets/favicon.png'}}
		/>,
		isStripped: false,
		onSelect: (value: {title: string}) => console.log(value.title),
	}, {
		title: 'Option 2',
		id: 1,
		icon: null,
		isStripped: false,
		onSelect: (value: {title: string}) => console.log(value.title),
	}],

	onHidden = () => console.log('i\'m hidden now!');

	render() {
		<Popover
			options={this.options}
			onHidden={this.onHidden}
		>
			<YourComponentToWrapping />
		</Popover>
	}
}

export default App;

Popover

Properties

namedescriptiontypedefault
optionsComponents which you wrapping (required)Node[]
childrenButton component (required)Node-
stylePopover styleStyle-
onHiddenCallback when popover has become hiddenFunction-

License

MIT License. © Alexey Gerasimov, 2019.

0.0.17

7 years ago

0.0.15

7 years ago

0.0.14

7 years ago

0.0.13

7 years ago

0.0.12

7 years ago

0.0.11

7 years ago

0.0.9

7 years ago

0.0.8

7 years ago

0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago