• Displays a native modal with a title, text and clickable buttons.

    Example

    import { Showpad } from '@showpad/experience-app-sdk'

    const modal = {
    title: 'Sample',
    text: 'This is a sample modal',
    buttons: [
    {
    reason: 'cancel'
    text: 'Cancel',
    tinted: false
    },
    {
    reason: 'ok'
    text: 'Ok',
    tinted: true
    },
    ]
    }

    const modalReason = await Showpad.displayModal(modal)

    Parameters

    Returns Promise<string>

    Reason the dialog was closed. This is either a reason from the passed ModalButtons or "cancel" if the user closed the dialog.

Generated using TypeDoc