The DialogBuilder provides an easy to use interface for creating simple dialogs in consistent Nextcloud design
// It is recommended to use `getDialogBuilder` insteadconst dialogBuilder = new DialogBuilder('The dialog title')const dialog = dialogBuilder .setText('The dialog message') .setSeverity(DialogSeverity.Warning) .addButton({ label: 'Ok', callback: () => console.warn('Warning was dismissed'), }) .build() Copy
// It is recommended to use `getDialogBuilder` insteadconst dialogBuilder = new DialogBuilder('The dialog title')const dialog = dialogBuilder .setText('The dialog message') .setSeverity(DialogSeverity.Warning) .addButton({ label: 'Ok', callback: () => console.warn('Warning was dismissed'), }) .build()
Optional
Add a single button
Button to add
Set buttons from array
Either an array of dialog buttons
Set dialog name
The name or headline of the dialog
Set the severity of the dialog
Severity of the dialog
Set the dialog text
Main text of the dialog
The DialogBuilder provides an easy to use interface for creating simple dialogs in consistent Nextcloud design
Example