MCPcopy Index your code
hub / github.com/callstack/react-native-paper / TextExample

Function TextExample

example/src/Examples/TextExample.tsx:21–119  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

19const Text = customText<'customVariant'>();
20
21const TextExample = () => {
22 const { isV3 } = useExampleTheme();
23
24 const fontConfig = {
25 customVariant: {
26 fontFamily: Platform.select({
27 ios: 'Noteworthy',
28 default: 'serif',
29 }),
30 fontWeight: '400',
31 letterSpacing: Platform.select({
32 ios: 7,
33 default: 4.6,
34 }),
35 lineHeight: 54,
36 fontSize: 40,
37 },
38 } as const;
39
40 const theme = {
41 ...MD3LightTheme,
42 fonts: configureFonts({ config: fontConfig }),
43 };
44 return (
45 <ScreenWrapper>
46 <View style={styles.container}>
47 {!isV3 && (
48 <>
49 <Caption style={styles.text}>Caption</Caption>
50 <Paragraph style={styles.text}>Paragraph</Paragraph>
51 <Subheading style={styles.text}>Subheading</Subheading>
52 <Title style={styles.text}>Title</Title>
53 <Headline style={styles.text}>Headline</Headline>
54 </>
55 )}
56
57 {isV3 && (
58 <>
59 <Text style={styles.text} variant="displayLarge">
60 Display Large
61 </Text>
62 <Text style={styles.text} variant="displayMedium">
63 Display Medium
64 </Text>
65 <Text style={styles.text} variant="displaySmall">
66 Display small
67 </Text>
68
69 <Text style={styles.text} variant="headlineLarge">
70 Headline Large
71 </Text>
72 <Text style={styles.text} variant="headlineMedium">
73 Headline Medium
74 </Text>
75 <Text style={styles.text} variant="headlineSmall">
76 Headline Small
77 </Text>
78

Callers

nothing calls this directly

Calls 2

useExampleThemeFunction · 0.90
configureFontsFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…