bombshell-dev / clack

Effortlessly build beautiful command-line apps
https://clack.cc
5.23k stars 88 forks source link

feat(@clack/prompts): add `disabled` option to `select` and `multiselect` prompts #161

Open Mist3rBru opened 10 months ago

Mist3rBru commented 10 months ago

This PR introduces a new disabled option for both the select and multiselect prompts. When this option is enabled, it prevents users from selecting the specified prompt's option. It's worth noting that while the multiselect prompt doesn't allow blocking the mark action, the disabled option will effectively block it upon submission.

Changes Made:

Demo:

https://github.com/natemoo-re/clack/assets/100330057/1293df96-6700-4e80-bb2b-5f7272b37f66

Closes #122

changeset-bot[bot] commented 10 months ago

🦋 Changeset detected

Latest commit: 2740d3f8930bff02b8361f70ef039431e2c7bbeb

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | -------------- | ----- | | @clack/prompts | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR