import React, { forwardRef } from 'react' import { type StyleProp, Text as RNText, type TextProps as RNTextProps, type TextStyle, TouchableOpacity, type TouchableOpacityProps, } from 'react-native' import Animated from 'react-native-reanimated' interface TextProps extends RNTextProps { onClick?: () => void touchProps?: TouchableOpacityProps animated?: boolean style?: StyleProp className?: string } const Text = forwardRef((props, ref) => { const { onClick, touchProps = {}, animated, style, className = '', children, ...reset } = props const textProps = { className, ref: ref, ...reset, } const handlePress = () => { onClick && onClick() } if (animated) { return {children} } if (onClick) { return ( {children} ) } return {children} }) Text.displayName = 'Text' export default Text