Add screenshotting

This commit is contained in:
Lei Nelissen
2022-06-15 11:45:38 +02:00
parent a402757c96
commit c19b9d8920
41 changed files with 736 additions and 192 deletions

View File

@@ -5,6 +5,7 @@ interface TouchableHandlerProps<T = number> {
id: T;
onPress: (id: T) => void;
onLongPress?: (id: T) => void;
testID?: string;
}
function TouchableStyles({ pressed }: { pressed: boolean }): ViewStyle {
@@ -23,7 +24,8 @@ function TouchableHandler<T>({
id,
onPress,
onLongPress,
children
children,
testID,
}: PropsWithChildren<TouchableHandlerProps<T>>): JSX.Element {
const handlePress = useCallback(() => {
return onPress(id);
@@ -38,6 +40,7 @@ function TouchableHandler<T>({
onPress={handlePress}
onLongPress={handleLongPress}
style={TouchableStyles}
testID={testID}
>
{children}
</Pressable>