import React, { Component } from "react";
import { View } from "react-native";

class DropDownMenu extends Component {
	state = {};

	render() {
		if (!this.props.visible) {
			return null;
		}
		return (
			<View style={[styles.container, this.props.style]}>
				{this.props.children}
			</View>
		);
	}
}

const styles = {
	container: {
		borderRadius: 2,
		shadowColor: "#000",
		shadowOffset: {
			width: 0,
			height: 2,
		},
		shadowOpacity: 0.2,
		shadowRadius: 4,
		elevation: 4,
		zIndex: 10,
		backgroundColor: "#fff",
		padding: 16,
		paddingVertical: 14,

		position: "absolute",
		right: 0,
		top: 0,
	},
};

export { DropDownMenu };
