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
Text component, that renders as `<div>` with [typography prop styles](https://github.com/exah/pss/blob/master/docs/api.md#typography) and [base prop styles](https://github.com/exah/pss/blob/master/docs/api.md#base). Component inside can be changed with `as` prop.
17
+
Based on [Box](/box) with [text system](https://github.com/exah/pss/blob/master/docs/api.md#text). Element inside can be changed with `use` prop, default to `<div>`,
18
18
19
19
## Usage
20
20
21
-
### Basic
22
-
23
21
```js
24
22
import { Text } from'pss-components'
25
23
```
26
24
27
-
```js
28
-
<Text use='p' textAlign='center'>
29
-
Text
30
-
</Text>
31
-
```
25
+
<Playground>
26
+
<Textuse='p'>Text</Text>
27
+
</Playground>
28
+
29
+
30
+
## Examples
31
+
32
+
### Change style with [text](https://github.com/exah/pss/blob/master/docs/api.md#text) props
33
+
34
+
<Playground>
35
+
<Text
36
+
use='p'
37
+
textAlign='center'
38
+
fontFamily='default'
39
+
fontSize={24}
40
+
lineHeight={2}
41
+
fontWeight={300}
42
+
letterSpacing='0.2px'
43
+
color='tomato'
44
+
>
45
+
Text
46
+
</Text>
47
+
</Playground>
48
+
32
49
33
-
### Add Text Styles to theme
50
+
### Set variant
34
51
35
-
See [textStyle](https://github.com/exah/pss/blob/master/docs/api.md#textstyle) docs.
52
+
See [textStyle docs](https://github.com/exah/pss/blob/master/docs/api.md#textstyle).
0 commit comments