Skip to content

Commit

Permalink
docs(prompt): fix prompt example
Browse files Browse the repository at this point in the history
  • Loading branch information
c4spar committed May 20, 2020
1 parent 42f701f commit 90f8595
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions examples/prompt/prompt.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
#!/usr/bin/env -S deno run
#!/usr/bin/env -S deno run --unstable

import { Checkbox, Confirm, Input, Number, Select, Separator } from '../../packages/prompt/mod.ts';
import { Checkbox, Confirm, Input, Number, Select, Toggle } from '../../packages/prompt/mod.ts';

await Confirm.prompt( {
message: 'Would you like to buy a pizza?'
} );

await Confirm.prompt( {
message: 'Would you like to buy a pizza?',
mode: 'legacy'
await Toggle.prompt( {
message: 'Would you like to buy a pizza?'
} );

await Input.prompt( {
Expand All @@ -21,10 +20,10 @@ await Number.prompt( {

await Select.prompt( {
message: 'Select your pizza?',
values: [ 'margherita', 'caprese', new Separator( 'Special' ), 'diavola' ]
options: [ 'margherita', 'caprese', Select.separator( 'Special' ), 'diavola' ]
} );

await Checkbox.prompt( {
message: `Du you like any extra's?`,
values: [ 'mozzarella', 'olive', new Separator( 'Special' ), 'buffalo mozzarella' ]
options: [ 'mozzarella', 'olive', Checkbox.separator( 'Special' ), 'buffalo mozzarella' ]
} );

0 comments on commit 90f8595

Please sign in to comment.