Skip to content

Commit 6ae7acc

Browse files
TalonVadim Demedes
authored andcommitted
Document <Text> component (#36)
1 parent 9c44d8a commit 6ae7acc

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

readme.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -519,6 +519,20 @@ const Demo = (
519519
);
520520
```
521521

522+
The `<Text>` compoment is a simple wrapper around [the `chalk` API](https://github.com/chalk/chalk#api) it supports all of the chalk methods as `props`.
523+
524+
```jsx
525+
import {Text} from "ink"
526+
527+
<Text rgb={[255, 255, 255]} bgKeyword="magenta">
528+
Hello!
529+
</Text>
530+
531+
<Text hex="#000000" bgHex="#FFFFFF">
532+
Hey there
533+
</Text>
534+
```
535+
522536
## License
523537

524538
MIT © [Vadim Demedes](https://github.com/vadimdemedes)

0 commit comments

Comments
 (0)