-
-
Notifications
You must be signed in to change notification settings - Fork 271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ability to change text when stopping and persisting #35
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -102,17 +102,35 @@ Start the spinner. Returns the instance. | |
|
||
Stop and clear the spinner. Returns the instance. | ||
|
||
### .succeed() | ||
#### .succeed([text]) | ||
|
||
Stop the spinner, change it to a green `✔` and persist the `text`. Returns the instance. See the GIF below. | ||
Stop the spinner, change it to a green `✔` and persist the current text, or `text` if provided. Returns the instance. See the GIF below. | ||
|
||
### .fail() | ||
#### .fail([text]) | ||
|
||
Stop the spinner, change it to a red `✖` and persist the `text`. Returns the instance. See the GIF below. | ||
Stop the spinner, change it to a red `✖` and persist the current text, or `text` if provided. Returns the instance. See the GIF below. | ||
|
||
### .stopAndPersist([symbol]) | ||
#### .stopAndPersist([options]) | ||
|
||
Stop the spinner, change it to `symbol` (or `' '` if `symbol` is not provided) and persist the `text`. Returns the instance. See the GIF below. | ||
Stop the spinner and change the symbol or text. Returns the instance. See the GIF below. | ||
|
||
##### options | ||
|
||
Type: `Object` | ||
|
||
###### symbol | ||
|
||
Type: `string`<br> | ||
Default: `' '` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think the default is an empty string. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The effective default is There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nah, it's good. |
||
|
||
Symbol to replace the spinner with. | ||
|
||
###### text | ||
|
||
Type: `string`<br> | ||
Default: Current text | ||
|
||
Text to be persisted. | ||
|
||
<img src="screenshot-2.gif" width="480"> | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a comment above here with the following: