Skip to content

Commit fe951e5

Browse files
Add support for boolean value for color option (#244)
Co-authored-by: Sindre Sorhus <[email protected]>
1 parent 86aca37 commit fe951e5

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

index.d.ts

+2-2
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

+2-2
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)