showDialog
Description
Open a dialog to display some information to the user
Parameters
Param | Data type | Required | Description |
---|---|---|---|
title | string | No | Title of the dialog |
description | string | No | Content of the dialog |
buttons | string[] | No (Default: ["OK"] ) | Array of title of the buttons |
dangerIndex | number | No | "Close" button position, first button position is 0 |
onClick | (index: number) => any | No | The action is triggered when the user press the button |
Return Value
N/A
Error Code
N/A
Sample Code and Sample Return Data
Sample Request:
window.zlpSdk.UI
.showDialog({ title: "Tiêu đề", description: "Đây là nội dung" })
.then((response) => console.log(response))
.catch((error) => console.error(error.errorCode));
Sample Response:
{ data: {}, status: "success" }