Skip to content

Conversation

@akwasniewski
Copy link
Contributor

Description

V3 implementation of pressable component

Test plan

Tested on the following example

import React from 'react';
import { Text, StyleSheet } from 'react-native';
import { Pressable, GestureHandlerRootView } from 'react-native-gesture-handler'

const PressableExample = () => {
  return (
    <GestureHandlerRootView style={styles.container}>
      <Pressable onPressOut={() => console.log("pressed")}
        style={({ pressed }) => [
          {
            backgroundColor: pressed ? 'darkseagreen' : 'seagreen',
          },
          styles.wrapperCustom,
        ]}
      >
        {({ pressed }) => (
          <Text style={styles.text}>
            {pressed ? 'Pressed!' : 'Press Me'}
          </Text>
        )}
      </Pressable>
    </GestureHandlerRootView >
  );
};

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
  },
  wrapperCustom: {
    borderRadius: 8,
    padding: 16,
    minWidth: 150,
    alignItems: 'center',
  },
  text: {
    fontSize: 18,
    color: 'white',
    fontWeight: '600',
  },
});

export default PressableExample;

@akwasniewski akwasniewski changed the base branch from main to next January 8, 2026 14:57
@akwasniewski akwasniewski changed the title @akwasniewski/v3 pressable V3 pressable Jan 8, 2026
@akwasniewski akwasniewski marked this pull request as draft January 8, 2026 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants