ftxPrompt
Shows a prompt dialog with an input field.
Parameters
options(Object | String) - Prompt options or message stringmessage(String) - Prompt message (required if options is object)title(String) - Dialog title (default: 'Prompt')icon(String) - Icon to displayokLabel(String) - Label for OK button (default: 'Yes')cancelLabel(String) - Label for Cancel button (default: 'No')placeholder(String) - Input placeholderdefaultValue(String) - Default input value$q(Object) - Optional Quasar instance
Returns
Dialog instance with event handlers:
onOk(callback)- Called when OK button clicked, receives input valueonCancel(callback)- Called when Cancel clickedonDismiss(callback)- Called on any dismissal
Usage
javascript
import { ftxPrompt } from '@ftx/ui';
ftxPrompt({
title: 'Enter Name',
message: 'Please enter your name:',
placeholder: 'Your name',
defaultValue: ''
})
.onOk((value) => {
console.log('User entered:', value);
})
.onCancel(() => {
console.log('Cancelled');
});