1.0.7 • Published 3 years ago

@mamodesaebsaad/rn-select-dropdown v1.0.7

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

React Native Select dropdown

rn-select-dropdown is a customized select menu for react native that works for android and ios platforms.

Installation

# Using npm

npm i @mamodesaebsaad/rn-select-dropdown

Usage

import Select from "@mamodesaebsaad/rn-select-dropdown";
...
const [value, setValue] = React.useState();
...
<Select title="Currency"
        data={["£", "$", "MUR", "€"]}
        value={value}
        onChangeValue={setValue}
        search={true}
        closeButton={true}
        searchBoxContainer={{ borderWidth: 0, backgroundColor: '#f5f5f5' }}
        searchTextInputStyle={{ backgroundColor: 'white' }}
        buttonStyle={{ backgroundColor: 'red', borderWidth: 0 }}
        buttonTextStyle={{ color: 'white' }}
/>

Props


data

array of data that will be represented in dropdown

TypeRequired
arrayYes

value

value of the selected option

TypeRequired
stringYes

onChangeValue

Method onChange

TypeRequired
Hook (useState)Yes

search

Enable/Disable Search in the dropdown

TypeRequired
booleanYes

closeButton

Enable/Disable close button in the dropdown

TypeRequired
booleanYes

searchBoxContainer

Styling of the SearchBox Container

TypeRequired
objectNo

searchTextInputStyle

Styling of the SearchBox Input style

TypeRequired
objectNo

buttonStyle

Styling of the close button style in the dropdown

TypeRequired
objectNo

buttonTextStyle

Styling of the close button text style in the dropdown

TypeRequired
objectNo