From c5ae0702bd5c5bf062fa679f223b08c4a9a8e3e6 Mon Sep 17 00:00:00 2001 From: rhunk <101876869+rhunk@users.noreply.github.com> Date: Wed, 27 Dec 2023 17:45:22 +0100 Subject: [PATCH] feat: example --- examples/toolbox.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 examples/toolbox.js diff --git a/examples/toolbox.js b/examples/toolbox.js new file mode 100644 index 0000000..85f95b1 --- /dev/null +++ b/examples/toolbox.js @@ -0,0 +1,17 @@ +// ==SE_module== +// name: toolbox_test +// displayName: Toolbox Test +// version: 1.0 +// author: SnapEnhance +// ==/SE_module== + +var im = require('interface-manager') + +module.onSnapApplicationLoad = context => { + im.create("conversationToolbox", (builder, args) => { + builder.text("Conversation id: " + args["conversationId"]) + builder.button("Dismiss Dialog", () => { + args["alertDialog"].dismiss() + }) + }) +} \ No newline at end of file