UNPKG

1.81 kBSource Map (JSON)View Raw
1{"version":3,"sources":["AnimatedText.tsx"],"names":["AnimatedText","style","theme","rest","writingDirection","I18nManager","isRTL","styles","text","fonts","regular","color","colors","StyleSheet","create","textAlign"],"mappings":";;;;;;;AAAA;;AACA;;AAOA;;;;;;;;AAUA;AACA;AACA;AACA;AACA;AACA,SAASA,YAAT,CAAsB;AAAEC,EAAAA,KAAF;AAASC,EAAAA,KAAT;AAAgB,KAAGC;AAAnB,CAAtB,EAAwD;AACtD,QAAMC,gBAAgB,GAAGC,yBAAYC,KAAZ,GAAoB,KAApB,GAA4B,KAArD;AAEA,sBACE,oBAAC,qBAAD,CAAU,IAAV,eACMH,IADN;AAEE,IAAA,KAAK,EAAE,CACLI,MAAM,CAACC,IADF,EAEL,EACE,GAAGN,KAAK,CAACO,KAAN,CAAYC,OADjB;AAEEC,MAAAA,KAAK,EAAET,KAAK,CAACU,MAAN,CAAaJ,IAFtB;AAGEJ,MAAAA;AAHF,KAFK,EAOLH,KAPK;AAFT,KADF;AAcD;;AAED,MAAMM,MAAM,GAAGM,wBAAWC,MAAX,CAAkB;AAC/BN,EAAAA,IAAI,EAAE;AACJO,IAAAA,SAAS,EAAE;AADP;AADyB,CAAlB,CAAf;;eAMe,wBAAUf,YAAV,C","sourcesContent":["import * as React from 'react';\nimport {\n Animated,\n TextStyle,\n I18nManager,\n StyleProp,\n StyleSheet,\n} from 'react-native';\nimport { withTheme } from '../../core/theming';\n\ntype Props = React.ComponentPropsWithRef<typeof Animated.Text> & {\n style?: StyleProp<TextStyle>;\n /**\n * @optional\n */\n theme: ReactNativePaper.Theme;\n};\n\n/**\n * Text component which follows styles from the theme.\n *\n * @extends Text props https://reactnative.dev/docs/text#props\n */\nfunction AnimatedText({ style, theme, ...rest }: Props) {\n const writingDirection = I18nManager.isRTL ? 'rtl' : 'ltr';\n\n return (\n <Animated.Text\n {...rest}\n style={[\n styles.text,\n {\n ...theme.fonts.regular,\n color: theme.colors.text,\n writingDirection,\n },\n style,\n ]}\n />\n );\n}\n\nconst styles = StyleSheet.create({\n text: {\n textAlign: 'left',\n },\n});\n\nexport default withTheme(AnimatedText);\n"]}
\No newline at end of file