import color from 'color'; import * as React from 'react'; import { I18nManager, StyleProp, TextStyle, StyleSheet, ColorValue, } from 'react-native'; import NativeText from './Text'; import { useTheme } from '../../core/theming'; import type { PositionProps } from '../../types'; type Props = React.ComponentProps & PositionProps & { alpha?: number; family?: | 'regular' | 'medium' | 'light' | 'thin' | 'extralight' | 'bold' | 'black' | 'semibold' | 'extrabold'; color?: ColorValue; style?: StyleProp; fs?: number; }; const StyledText = ({ alpha = 1, family = 'regular', style, color: overrideColor, fs = 14, mb, mt, ml, mr, mv, mh, p, m, pl, pr, pv, ph, pb, pt, ...rest }: Props) => { const theme = useTheme(); const textColor = color(overrideColor ? overrideColor : theme.colors?.text) .alpha(alpha) .rgb() .string(); const writingDirection = I18nManager.isRTL ? 'rtl' : 'ltr'; return ( ); }; const styles = StyleSheet.create({ text: { textAlign: 'left', }, }); export default StyledText;