import React from 'react'; import { StyleSheet, View, Text, Pressable } from 'react-native'; import { useTheme } from '../../../contexts/ThemeContext'; import { Back } from '../../../icons/Back'; export type TextBasedIndicatorProps = { text: string; onBackPress?: () => void; }; export const TextBasedIndicator = (props: TextBasedIndicatorProps) => { const { theme: { colors, typefaces, variants: { iconSizes, insets }, }, } = useTheme(); return ( {props.onBackPress && ( [ { opacity: pressed ? 0.2 : 1, height: iconSizes.md, width: iconSizes.md, }, ]} > )} {props.text} ); }; const styles = StyleSheet.create({ container: { flex: 1, }, backContainer: { padding: 8, paddingTop: 16, }, textContainer: { flex: 1, justifyContent: 'center', alignItems: 'center', }, text: { fontSize: 24, }, });