Skip to content

Commit

Permalink
Ts Support
Browse files Browse the repository at this point in the history
  • Loading branch information
Danish Amin committed Jun 23, 2022
1 parent a4364f0 commit 5f34cbd
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 0 deletions.
65 changes: 65 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
import {ViewStyle} from 'react-native'
export interface SelectListProps {

/**
* Fn to set Selected option value which will be stored in your local state
*/
setSelected: React.Dispatch<React.SetStateAction<undefined>>,

/**
* Placeholder text that will be displayed in the select box
*/
placeholder?: string,

/**
* Additional styles for select box
*/
boxStyles?: ViewStyle,

/**
* Additional styles for text of select box
*/
inputStyles?: ViewStyle,

/**
* Additional styles for dropdown scrollview
*/
dropdownStyles?:ViewStyle,

/**
* Additional styles for dropdown list item
*/
dropdownItemStyles?: ViewStyle,

/**
* Additional styles for list items text
*/
dropdownTextStyles?: ViewStyle,

/**
* Maximum height of the dropdown wrapper to occupy
*/
maxHeight?: number,

/**
* Data which will be iterated as options of select list
*/
data: Array<{}>,

/**
* Pass any JSX to this prop like Text, Image or Icon to show instead of search icon
*/
searchicon?: JSX.Element,

/**
* Pass any JSX to this prop like Text, Image or Icon to show instead of chevron icon
*/
arrowicon?: JSX.Element,

/**
* set to false if you dont want to use search functionality
*/
search?: boolean


}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "1.0.12",
"description": "⭐ React Native Select List Equivalent to Html's Select with options\"",
"main": "index.tsx",
"types": "index.d.ts",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
Expand Down

0 comments on commit 5f34cbd

Please sign in to comment.