Skip to content

Commit

Permalink
chore: update playground
Browse files Browse the repository at this point in the history
  • Loading branch information
ivodolenc committed Oct 15, 2023
1 parent d50e993 commit 2f2d1d7
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions playground/spinner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,36 @@ import { createSpinner } from '../src/index.js'

const spinner = createSpinner()

spinner.start()
spinner.start({
message: 'Step 1: Loading...',
})

setTimeout(() => {
spinner.update({
message: 'Still loading...',
message: 'Step 1: Still loading...',
})
}, 1000)

setTimeout(() => {
spinner.update({
message: 'Almost done...',
message: 'Step 1: Almost done...',
})
}, 2000)

setTimeout(() => {
spinner.stop()
spinner.stop({
message: 'Step 1: Done!',
})
}, 3000)

setTimeout(() => {
spinner.start({
message: 'Step 2: Loading...',
})
}, 4000)

setTimeout(() => {
spinner.stop({
message: 'Step 2: Done!',
})
}, 5000)

0 comments on commit 2f2d1d7

Please sign in to comment.