HotlightOrg / hotlight

A search engine and hot key thingy for saas products
MIT License
3 stars 0 forks source link

Argument API #61

Open arnklint opened 2 years ago

arnklint commented 2 years ago

Enable an action to "request" arguments from the users.

const name = await arg("Your name");

// with options
const orgType = arg("Type of Organisation", { options: [{ label: "Large", value: "lg" }, { label: "small", value: "indie" }], strict: false, prefilled: "small" })

// disabling strict enables user to type anything
arnklint commented 2 years ago

This could be improved to offer validation, multiple choice, single choice, text? and other kinds of input elements/formats.

Should keys / values of previous arguments be shown somewhere in the ui?