Skip to content

Commit

Permalink
feat(exposed/prompts): confirm shows timeout if passed
Browse files Browse the repository at this point in the history
  • Loading branch information
rafamel committed Apr 26, 2019
1 parent 71cdfa7 commit 316da0e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/exposed/prompts/confirm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ export default function confirm(options: IConfirmOptions = {}) {
prompts({
type: 'confirm',
name: 'value',
message: options.message || 'Continue?',
message:
(options.message || 'Continue?') +
(options.timeout
? ` [${Math.round(options.timeout / 100) / 10}s]`
: ''),
initial: options.initial || false
})
);
Expand Down

0 comments on commit 316da0e

Please sign in to comment.