A JS Library to prompt input dialogs dynamically so you don't have to waste time writing HTML
To prompt user for area of a square, normally you'd —
let s = window.prompt('Enter square side length:')
console.log(`The area of the square is ${s*s}`)
but for rectangle this code becomes unusable, so you can use promptJS —
prompt.inputModal("Area of Rectangle",["Enter Length:","Enter Width:"], (l,b)=>{
console.log(`Area of the rectangle is ${l*b}`)
})
Output may vary depending on your Bootstrap theme
- jQuery v2.1.3
- Bootstrap v4.0.0
For single/multiple input dialogs -
prompt.inputModal(title,[label1, label2,...],
(input1, input2,...)=>{
//do stuff with inputs
})
For simple message dialogs -
prompt.message(title,body)
To call a predefined modal
prompt.call(title)
prompt.inputModal("Greetings",["What's ur name?"],function (name){
console.log(`Well, Hello ${name}`)
})
prompt.message("About","Prompt v.1.0")
prompt.call("Greetings")
Consider studying graphviz for a project-example
Add examples, screenshots, etc- Make more projects demonstrating usefulnes of promptJS