Skip to content

Commit d644bef

Browse files
authored
Merge pull request hossein-zare#542 from amhinson/feature/item-label-props
feat: Add itemLabelProps
2 parents a6b2e7f + b5a5374 commit d644bef

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/components/Picker.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ function Picker({
129129
activityIndicatorColor = Colors.GREY,
130130
props = {},
131131
itemProps = {},
132+
itemLabelProps = {},
132133
badgeProps= {},
133134
modalProps = {},
134135
flatListProps = {},
@@ -1446,6 +1447,7 @@ function Picker({
14461447
disabled={item?.[_schema.disabled] ?? false}
14471448
custom={item.custom ?? false}
14481449
props={itemProps}
1450+
labelProps={itemLabelProps}
14491451
isSelected={isSelected}
14501452
IconComponent={IconComponent}
14511453
TickIconComponent={_TickIconComponent}
@@ -1492,6 +1494,7 @@ function Picker({
14921494
_value,
14931495
multiple,
14941496
itemProps,
1497+
itemLabelProps,
14951498
categorySelectable,
14961499
onPressItem,
14971500
theme,

src/components/RenderListItem.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ function RenderListItem({
2020
selectable,
2121
disabled,
2222
props,
23+
labelProps,
2324
custom,
2425
isSelected,
2526
IconComponent,
@@ -164,7 +165,7 @@ function RenderListItem({
164165
return (
165166
<TouchableOpacity style={_listItemContainerStyle} onPress={__onPress} onLayout={onLayout} {...props} disabled={selectable === false || disabled} testID={item.testID}>
166167
{IconComponent}
167-
<Text style={_listItemLabelStyle}>
168+
<Text style={_listItemLabelStyle} {...labelProps}>
168169
{label}
169170
</Text>
170171
{_TickIconComponent}

0 commit comments

Comments
 (0)