Skip to content

Commit

Permalink
bottom border color prop and option of no remove items selected
Browse files Browse the repository at this point in the history
  • Loading branch information
Bruno Martínez committed Aug 10, 2021
1 parent 6f7597a commit 8c2e9c2
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ function SelectBox({
multiListEmptyLabelStyle,
listEmptyLabelStyle,
selectedItemStyle,
removeItemsSelected,
listEmptyText = 'No results found',
...props
}) {
Expand Down Expand Up @@ -112,14 +113,18 @@ function SelectBox({
const kMultiOptionsLabelStyle = {
fontSize: 10,
color: '#fff',
padding: 4,
marginRight: 5,
...multiOptionsLabelStyle,
}

return (
<View style={kMultiOptionContainerStyle}>
<Text style={kMultiOptionsLabelStyle}>{label.item}</Text>
<TouchableOpacity style={{ marginLeft: 15 }} hitSlop={hitSlop} onPress={onPressItem()}>
<Icon name="closeCircle" fill="#fff" width={21} height={21} />
</TouchableOpacity>
{ removeItemsSelected ?
<TouchableOpacity hitSlop={hitSlop} onPress={onPressItem()}>
<Icon name="closeCircle" fill="#fff" width={21} height={21} />
</TouchableOpacity> : null }
</View>
)

Expand All @@ -140,6 +145,7 @@ function SelectBox({
arrowIconColor = Colors.primary,
searchIconColor = Colors.primary,
toggleIconColor = Colors.primary,
bottomBarColor ='#ddd',
searchInputProps,
multiSelectInputFieldProps,
listOptionProps = {},
Expand Down Expand Up @@ -188,7 +194,7 @@ function SelectBox({
const kContainerStyle = {
flexDirection: 'row',
width: '100%',
borderColor: '#ddd',
borderColor: bottomBarColor,
borderBottomWidth: 1,
paddingTop: 6,
paddingRight: 20,
Expand Down

0 comments on commit 8c2e9c2

Please sign in to comment.