UNPKG

@duocvo/react-native-select-dropdown

Version:

This package was forked from https://github.com/AdelRedaa97/react-native-select-dropdown. Allow multiple select dropdown with search and custom styles.

30 lines (26 loc) 600 B
import {StyleSheet, TouchableOpacity} from 'react-native'; import React from 'react'; const DropdownOverlay = ({onPress, backgroundColor}) => { const defaults = { backgroundColor: backgroundColor || 'rgba(0,0,0,0.4)', }; return ( <TouchableOpacity activeOpacity={1} onPress={onPress} style={{ ...styles.dropdownOverlay, ...{ backgroundColor: defaults.backgroundColor, }, }} /> ); }; export default DropdownOverlay; const styles = StyleSheet.create({ dropdownOverlay: { width: '100%', height: '100%', }, });