Skip to content

Commit df38f9e

Browse files
George Karagkiaourissindresorhus
authored andcommitted
Update readme for Color, Bold, Underline (#71)
1 parent 288c4db commit df38f9e

1 file changed

Lines changed: 20 additions & 6 deletions

File tree

readme.md

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -537,18 +537,32 @@ const Demo = (
537537
);
538538
```
539539

540-
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`.
540+
The `<Color>` compoment is a simple wrapper around [the `chalk` API](https://github.com/chalk/chalk#api) it supports all of the chalk methods as `props`.
541541

542542
```jsx
543-
import {Text} from "ink"
543+
import {Color} from 'ink';
544544

545-
<Text rgb={[255, 255, 255]} bgKeyword="magenta">
545+
<Color rgb={[255, 255, 255]} bgKeyword="magenta">
546546
Hello!
547-
</Text>
547+
</Color>
548548

549-
<Text hex="#000000" bgHex="#FFFFFF">
549+
<Color hex="#000000" bgHex="#FFFFFF">
550550
Hey there
551-
</Text>
551+
</Color>
552+
```
553+
554+
The `<Bold>` and `<Underline>` components render their children bolded and underlined respectively.
555+
556+
```jsx
557+
import {Bold, Underline} from 'ink';
558+
559+
<Bold>
560+
I am bold
561+
</Bold>
562+
563+
<Underline>
564+
I am underlined
565+
</Underline>
552566
```
553567

554568
## License

0 commit comments

Comments
 (0)