You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Composes React Native's `Text` component (i.e. you can pass its props)
13
-
14
-
**Note!!!** In web environment sometimes you need to wrap `Paragraph` in a `<Box>` or provide a parent node with `display: flex` and `flex-direction: column` for centering to work properly. In React Native it is non issue because all nodes be default have these properties
12
+
Composes React Native's `Text` component
15
13
16
14
### Usage
17
15
18
-
<Playground>
19
-
<Box>
20
-
<Paragraph
21
-
color="primary"
22
-
align="left"
23
-
size="large"//small-largeornumber
24
-
fontFamily="text"
25
-
weight="normal"
26
-
getStyles={(props, theme) => ({
27
-
paragraphStyle: {},
28
-
})}
29
-
>
30
-
Lorem ipsum dolar set amet
31
-
</Paragraph>
32
-
</Box>
33
-
</Playground>
34
-
35
-
### Sizes
36
-
37
16
<Playground>
38
17
<BoxflexDirection="column">
39
18
<Paragraphsize="small">Lorem ipsum dolar set amet</Paragraph>
@@ -45,3 +24,21 @@ Composes React Native's `Text` component (i.e. you can pass its props)
Copy file name to clipboardExpand all lines: src/components/Typography/Text.mdx
+35-37Lines changed: 35 additions & 37 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,31 +9,7 @@ import { Box, Text } from '..';
9
9
10
10
# Text
11
11
12
-
Composes React Native's `Text` component (i.e. you can pass its props)
13
-
14
-
**Note!!!** In web environment sometimes you need to wrap `Text` in a `<Box>` or provide a parent node with `display: flex` and `flex-direction: column` for centering to work properly. In React Native it is non issue because all nodes be default have these properties
15
-
16
-
### Usage
17
-
18
-
<Playground>
19
-
<Box>
20
-
<Text
21
-
color="primary"//orcustom
22
-
align="left"
23
-
size="large"//small-largeornumber
24
-
fontFamily="text"
25
-
weight="normal"
26
-
isItalic
27
-
isInline
28
-
transform="uppercase"
29
-
getStyles={(props, theme) => ({
30
-
textStyle: {},
31
-
})}
32
-
>
33
-
Lorem ipsum dolar set amet
34
-
</Text>
35
-
</Box>
36
-
</Playground>
12
+
Composes React Native's `Text`
37
13
38
14
### Sizes
39
15
@@ -65,16 +41,6 @@ Composes React Native's `Text` component (i.e. you can pass its props)
65
41
</Box>
66
42
</Playground>
67
43
68
-
### Font Families
69
-
70
-
<Playground>
71
-
<BoxflexDirection="column">
72
-
<TextfontFamily="heading">heading</Text>
73
-
<TextfontFamily="text">text</Text>
74
-
<TextfontFamily="mono">mono</Text>
75
-
</Box>
76
-
</Playground>
77
-
78
44
### Font Weights
79
45
80
46
<Playground>
@@ -87,20 +53,52 @@ Composes React Native's `Text` component (i.e. you can pass its props)
87
53
</Box>
88
54
</Playground>
89
55
90
-
### Variations
56
+
### Alignments
91
57
92
58
<Playground>
93
59
<BoxflexDirection="column">
94
-
<TextisItalic>Lorem ipsum dolar set amet</Text>
95
60
<Textalign="left">Lorem ipsum dolar set amet</Text>
96
61
<Textalign="center">Lorem ipsum dolar set amet</Text>
97
62
<Textalign="right">Lorem ipsum dolar set amet</Text>
63
+
</Box>
64
+
</Playground>
65
+
66
+
### Transforms
67
+
68
+
<Playground>
69
+
<BoxflexDirection="column">
98
70
<Texttransform="uppercase">Lorem ipsum dolar set amet</Text>
99
71
<Texttransform="lowercase">Lorem ipsum dolar set amet</Text>
100
72
<Texttransform="capitalize">Lorem ipsum dolar set amet</Text>
0 commit comments