chalk-pipe component for Ink 5
Create color text with simpler style strings in Ink
$ npm i ink-color-pipe
This brings you a convenient way to use some color schemes.
import React from "react";
import { render, Text } from "ink";
import Color from "ink-color-pipe";
const link = "blue.underline";
const error = "bgRed.white";
render(
<Text>
<Color styles={link}>Unicorn</Color>
<Color styles={error}>{" Error "}</Color>
</Text>,
);
<Color>
is using <Transform>
for text rendering.
Type: string
Use dot .
to separeate multiple styles.
- chalk-pipe - Create chalk style schemes with simpler style strings
MIT