Skip to content

Commit

Permalink
Merge pull request #542 from amhinson/feature/item-label-props
Browse files Browse the repository at this point in the history
feat: Add itemLabelProps
  • Loading branch information
hossein-zare authored Nov 9, 2022
2 parents a6b2e7f + b5a5374 commit d644bef
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/components/Picker.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ function Picker({
activityIndicatorColor = Colors.GREY,
props = {},
itemProps = {},
itemLabelProps = {},
badgeProps= {},
modalProps = {},
flatListProps = {},
Expand Down Expand Up @@ -1446,6 +1447,7 @@ function Picker({
disabled={item?.[_schema.disabled] ?? false}
custom={item.custom ?? false}
props={itemProps}
labelProps={itemLabelProps}
isSelected={isSelected}
IconComponent={IconComponent}
TickIconComponent={_TickIconComponent}
Expand Down Expand Up @@ -1492,6 +1494,7 @@ function Picker({
_value,
multiple,
itemProps,
itemLabelProps,
categorySelectable,
onPressItem,
theme,
Expand Down
3 changes: 2 additions & 1 deletion src/components/RenderListItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ function RenderListItem({
selectable,
disabled,
props,
labelProps,
custom,
isSelected,
IconComponent,
Expand Down Expand Up @@ -164,7 +165,7 @@ function RenderListItem({
return (
<TouchableOpacity style={_listItemContainerStyle} onPress={__onPress} onLayout={onLayout} {...props} disabled={selectable === false || disabled} testID={item.testID}>
{IconComponent}
<Text style={_listItemLabelStyle}>
<Text style={_listItemLabelStyle} {...labelProps}>
{label}
</Text>
{_TickIconComponent}
Expand Down

0 comments on commit d644bef

Please sign in to comment.