Skip to content

Commit

Permalink
fix: onPress prop added to SelectItem component (#6741)
Browse files Browse the repository at this point in the history
  • Loading branch information
tommasini authored Jul 5, 2023
1 parent 151b54e commit 18cb3a3
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,17 @@ const SelectItem: React.FC<SelectItemProps> = ({
isSelected = false,
isDisabled = false,
children,
onPress,
...props
}) => {
const { styles } = useStyles(styleSheet, { style, isDisabled });

return (
<TouchableOpacity style={styles.base} disabled={isDisabled}>
<TouchableOpacity
style={styles.base}
disabled={isDisabled}
onPress={onPress}
>
<ListItem
padding={DEFAULT_SELECTITEM_PADDING}
borderRadius={DEFAULT_SELECTITEM_BORDERRADIUS}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ exports[`AccountSelectorList should render all accounts but only the balance for
>
<TouchableOpacity
disabled={false}
onPress={[Function]}
style={
Object {
"opacity": 1,
Expand Down Expand Up @@ -221,6 +222,7 @@ exports[`AccountSelectorList should render all accounts but only the balance for
>
<TouchableOpacity
disabled={false}
onPress={[Function]}
style={
Object {
"opacity": 1,
Expand Down Expand Up @@ -382,6 +384,7 @@ exports[`AccountSelectorList should render all accounts with balances 1`] = `
>
<TouchableOpacity
disabled={false}
onPress={[Function]}
style={
Object {
"opacity": 1,
Expand Down Expand Up @@ -641,6 +644,7 @@ exports[`AccountSelectorList should render all accounts with balances 1`] = `
>
<TouchableOpacity
disabled={false}
onPress={[Function]}
style={
Object {
"opacity": 1,
Expand Down Expand Up @@ -929,6 +933,7 @@ exports[`AccountSelectorList should render all accounts with right acessory 1`]
>
<TouchableOpacity
disabled={false}
onPress={[Function]}
style={
Object {
"opacity": 1,
Expand Down Expand Up @@ -1141,6 +1146,7 @@ exports[`AccountSelectorList should render all accounts with right acessory 1`]
>
<TouchableOpacity
disabled={false}
onPress={[Function]}
style={
Object {
"opacity": 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,7 @@ exports[`Network Selector renders correctly 1`] = `
<View>
<TouchableOpacity
disabled={false}
onPress={[Function]}
style={
Object {
"alignItems": "center",
Expand Down Expand Up @@ -553,6 +554,7 @@ exports[`Network Selector renders correctly 1`] = `
</TouchableOpacity>
<TouchableOpacity
disabled={false}
onPress={[Function]}
style={
Object {
"alignItems": "center",
Expand Down Expand Up @@ -644,6 +646,7 @@ exports[`Network Selector renders correctly 1`] = `
</TouchableOpacity>
<TouchableOpacity
disabled={false}
onPress={[Function]}
style={
Object {
"alignItems": "center",
Expand Down Expand Up @@ -735,6 +738,7 @@ exports[`Network Selector renders correctly 1`] = `
</TouchableOpacity>
<TouchableOpacity
disabled={false}
onPress={[Function]}
style={
Object {
"alignItems": "center",
Expand Down Expand Up @@ -826,6 +830,7 @@ exports[`Network Selector renders correctly 1`] = `
</TouchableOpacity>
<TouchableOpacity
disabled={false}
onPress={[Function]}
style={
Object {
"alignItems": "center",
Expand Down

0 comments on commit 18cb3a3

Please sign in to comment.