import color from "color"; import * as React from "react"; import { I18nManager, StyleProp, TextStyle, StyleSheet } from "react-native"; import { DefaultTheme, ThemeContext } from "styled-components"; import Text from "./Text"; type Props = React.ComponentProps & { alpha: number; family: "regular" | "medium" | "light" | "thin"; style?: StyleProp; theme?: DefaultTheme; }; const StyledText = ({ alpha, family, style, ...rest }: Props) => { const theme = React.useContext(ThemeContext); const textColor = color(theme.colors.text).alpha(alpha).rgb().string(); const font = theme.fonts[family]; const writingDirection = I18nManager.isRTL ? "rtl" : "ltr"; return ( ); }; const styles = StyleSheet.create({ text: { textAlign: "left", }, }); export default StyledText;