|
1 | 1 | import React from 'react';
|
2 |
| -import {Text, View} from 'react-native'; |
3 |
| -import { |
4 |
| - H1, |
5 |
| - H2, |
6 |
| - H3, |
7 |
| - H4, |
8 |
| - H5, |
9 |
| - H6, |
10 |
| - S, |
11 |
| - Del, |
12 |
| - U, |
13 |
| - P, |
14 |
| - Strong, |
15 |
| - Br, |
16 |
| - Div, |
17 |
| - Hr, |
18 |
| - Em, |
19 |
| - RnText, |
20 |
| -} from '@uiw/react-native'; |
| 2 | +import {View} from 'react-native'; |
| 3 | +import {H1, H2, H3, H4, H5, H6, S, Del, U, P, Strong, Br, Div, Hr, Em, RnText, Text} from '@uiw/react-native'; |
21 | 4 | import {ComProps} from '../../routes';
|
22 | 5 | import Layout, {Container} from '../../Layout';
|
23 | 6 | const {Header, Body, Card, Footer} = Layout;
|
@@ -48,43 +31,34 @@ export default class TypographyView extends React.Component<TypographyViewProps>
|
48 | 31 | <Div>这是一段文本{'<Div>'}</Div>
|
49 | 32 | <Div>
|
50 | 33 | <View>
|
51 |
| - <Text>既可以是 View/Text 组件 也可以是纯字符串 </Text> |
| 34 | + <Text color="text">既可以是 View/Text 组件 也可以是纯字符串 </Text> |
52 | 35 | </View>
|
53 | 36 | </Div>
|
54 | 37 | </Card>
|
55 | 38 | <Card title="加粗<Strong>">
|
56 | 39 | <Strong>这段文本加粗的{'<Strong>'}</Strong>
|
57 | 40 | </Card>
|
58 | 41 | <Card title="换行<Br />">
|
59 |
| - <Text> |
| 42 | + <Text color="text"> |
60 | 43 | 文本开始
|
61 | 44 | <Br />
|
62 | 45 | 换行结束
|
63 | 46 | </Text>
|
64 |
| - <Text> |
65 |
| - 上面两行文本使用 {'<Text>文本开始<Br />换行结束</Text>'}{' '} |
66 |
| - 组件换行 |
67 |
| - </Text> |
| 47 | + <Text color="text">上面两行文本使用 {'<Text>文本开始<Br />换行结束</Text>'} 组件换行</Text> |
68 | 48 | </Card>
|
69 | 49 | <Card title="斜体强调<Em />">
|
70 | 50 | <Em>斜体强调 fontStyle: 'italic' 中文失效</Em>
|
71 | 51 | </Card>
|
72 | 52 | <Card title="水平线<Hr />">
|
73 |
| - <Text>一段文本</Text> |
| 53 | + <Text color="text">一段文本</Text> |
74 | 54 | <Hr />
|
75 |
| - <Text>一段文本</Text> |
| 55 | + <Text color="text">一段文本</Text> |
76 | 56 | </Card>
|
77 | 57 | <Card title="可高亮文字<RnText />">
|
78 | 58 | <RnText type="header" label="react-native-uiw" />
|
79 | 59 | <RnText type="title" label="react-native-uiw" />
|
80 | 60 | <RnText type="subLabel" label="react-native-uiw" />
|
81 |
| - <RnText |
82 |
| - type="header" |
83 |
| - uppercase |
84 |
| - label="react-native-uiw" |
85 |
| - highlightText="native" |
86 |
| - highlightTextStyle={{fontSize: 24, color: 'red'}} |
87 |
| - /> |
| 61 | + <RnText type="header" uppercase label="react-native-uiw" highlightText="native" highlightTextStyle={{fontSize: 24, color: 'red'}} /> |
88 | 62 | <RnText
|
89 | 63 | style={{fontSize: 14}}
|
90 | 64 | type="label"
|
|
0 commit comments