-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Expand file tree
/
Copy pathtext.tsx
More file actions
65 lines (61 loc) · 1.31 KB
/
text.tsx
File metadata and controls
65 lines (61 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
import React from 'react';
import { StyleSheet, View } from 'react-native';
import { Text, useTheme } from '@rneui/themed';
import { Header } from '../components/header';
type TextComponentProps = {};
const TextComponent: React.FunctionComponent<TextComponentProps> = () => {
const { theme } = useTheme();
return (
<>
<Header title="Text" view="text" />
<View style={styles.view}>
<Text
style={styles.text}
h1
h1Style={{ color: theme?.colors?.secondary }}
>
Heading 1
</Text>
<Text
style={styles.text}
h2
h2Style={{ color: theme?.colors?.success }}
>
Heading 2
</Text>
<Text
style={styles.text}
h3
h3Style={{ color: theme?.colors?.warning }}
>
Heading 3
</Text>
<Text
style={styles.text}
h4
h4Style={{ color: theme?.colors?.primary }}
>
Heading 4
</Text>
</View>
</>
);
};
const styles = StyleSheet.create({
view: {
margin: 10,
},
text: {
textAlign: 'center',
padding: 5,
},
more: {
marginVertical: 20,
},
button: {
width: 120,
marginLeft: 'auto',
marginRight: 'auto',
},
});
export default TextComponent;