FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add support for `boolean` value for `color` option (#244) · sindresorhus/ora@fe951e5 · GitHub

Commit fe951e5

Browse files
Add support for boolean value for color option (#244)
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
1 parent 86aca37 commit fe951e5

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎index.d.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export type Options = {
5858
5959
@default 'cyan'
6060
*/
61-
readonly color?: Color;
61+
readonly color?: Color | boolean;
6262

6363
/**
6464
Set to `false` to stop Ora from hiding the cursor.
@@ -186,7 +186,7 @@ export interface Ora {
186186
/**
187187
Change the spinner color.
188188
*/
189-
color: Color;
189+
color: Color | boolean;
190190

191191
/**
192192
Change the spinner indent.

‎readme.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ Or an object like:
7676

7777
##### color
7878

79-
Type: `string`\
79+
Type: `string | boolean`\
8080
Default: `'cyan'`\
81-
Values: `'black' | 'red' | 'green' | 'yellow' | 'blue' | 'magenta' | 'cyan' | 'white' | 'gray'`
81+
Values: `'black' | 'red' | 'green' | 'yellow' | 'blue' | 'magenta' | 'cyan' | 'white' | 'gray' | boolean`
8282

8383
The color of the spinner.
8484

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL