0.0.17 • Published 6 years ago

react-native-popover-typescript v0.0.17

Weekly downloads
3
License
MIT
Repository
github
Last release
6 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

6 years ago

0.0.15

6 years ago

0.0.14

6 years ago

0.0.13

6 years ago

0.0.12

6 years ago

0.0.11

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago