Skip to content

Commit

Permalink
remove the unnecessary touchable wrapper (#537)
Browse files Browse the repository at this point in the history
  • Loading branch information
johntheZ authored May 9, 2024
1 parent c9f6e08 commit fd3a03a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 25 deletions.
9 changes: 4 additions & 5 deletions src/components/BaseToast.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
import React from 'react';
import { Text, View } from 'react-native';
import { Text, View, TouchableOpacity } from 'react-native';

import { BaseToastProps } from '../types';
import { getTestId } from '../utils/test-id';
import { styles } from './BaseToast.styles';
import { Touchable } from './Touchable';

export function BaseToast({
text1,
text2,
onPress,
activeOpacity,
activeOpacity = 1,
style,
touchableContainerProps,
contentContainerStyle,
Expand All @@ -25,7 +24,7 @@ export function BaseToast({
renderTrailingIcon
}: BaseToastProps) {
return (
<Touchable
<TouchableOpacity
testID={getTestId('TouchableContainer')}
onPress={onPress}
activeOpacity={activeOpacity}
Expand Down Expand Up @@ -58,6 +57,6 @@ export function BaseToast({
)}
</View>
{renderTrailingIcon && renderTrailingIcon()}
</Touchable>
</TouchableOpacity>
);
}
20 changes: 0 additions & 20 deletions src/components/Touchable.tsx

This file was deleted.

0 comments on commit fd3a03a

Please sign in to comment.