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
Copy file name to clipboardExpand all lines: readme.md
+20-6Lines changed: 20 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -537,18 +537,32 @@ const Demo = (
537
537
);
538
538
```
539
539
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`.
541
541
542
542
```jsx
543
-
import {Text} from"ink"
543
+
import {Color} from'ink';
544
544
545
-
<Text rgb={[255, 255, 255]} bgKeyword="magenta">
545
+
<Color rgb={[255, 255, 255]} bgKeyword="magenta">
546
546
Hello!
547
-
</Text>
547
+
</Color>
548
548
549
-
<Text hex="#000000" bgHex="#FFFFFF">
549
+
<Color hex="#000000" bgHex="#FFFFFF">
550
550
Hey there
551
-
</Text>
551
+
</Color>
552
+
```
553
+
554
+
The `<Bold>` and `<Underline>` components render their children bolded and underlined respectively.
0 commit comments