19 lines
522 B
TypeScript
19 lines
522 B
TypeScript
import { Text } from '@gluestack-ui/themed';
|
|
import {StyleProp, TextStyle} from 'react-native';
|
|
import { MyTouchableOpacity } from './MyTouchableOpacity';
|
|
|
|
interface MyClickableTextProps {
|
|
textStyle?: StyleProp<TextStyle>;
|
|
text: string;
|
|
onPress?: () => void;
|
|
color?: string;
|
|
}
|
|
|
|
export function MyClickableText({textStyle, text, onPress, color}: MyClickableTextProps) {
|
|
return (
|
|
<MyTouchableOpacity onPress={onPress}>
|
|
<Text color={color} style={textStyle}>{text}</Text>
|
|
</MyTouchableOpacity>
|
|
);
|
|
}
|