Skip to content

Commit

Permalink
Add support for boolean value for color option (#244)
Browse files Browse the repository at this point in the history
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
  • Loading branch information
Mallikarjun-0 and sindresorhus authored Feb 2, 2025
1 parent 86aca37 commit fe951e5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export type Options = {
@default 'cyan'
*/
readonly color?: Color;
readonly color?: Color | boolean;

/**
Set to `false` to stop Ora from hiding the cursor.
Expand Down Expand Up @@ -186,7 +186,7 @@ export interface Ora {
/**
Change the spinner color.
*/
color: Color;
color: Color | boolean;

/**
Change the spinner indent.
Expand Down
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ Or an object like:

##### color

Type: `string`\
Type: `string | boolean`\
Default: `'cyan'`\
Values: `'black' | 'red' | 'green' | 'yellow' | 'blue' | 'magenta' | 'cyan' | 'white' | 'gray'`
Values: `'black' | 'red' | 'green' | 'yellow' | 'blue' | 'magenta' | 'cyan' | 'white' | 'gray' | boolean`

The color of the spinner.

Expand Down

0 comments on commit fe951e5

Please sign in to comment.