Skip to content

Commit

Permalink
chore(@clack/prompts): update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
await-ovo committed Sep 8, 2023
1 parent 90f8e3d commit d20891b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/prompts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ The `isCancel` function is a guard that detects when a user cancels a question w
```js
import { isCancel, cancel, text } from '@clack/prompts';

const value = await text(/* TODO */);
const value = await text({
message: 'What is the meaning of life?',
});

if (isCancel(value)) {
cancel('Operation cancelled.');
Expand Down

0 comments on commit d20891b

Please sign in to comment.