From 430a0829fc7d9562737bad3d4c315285f9411385 Mon Sep 17 00:00:00 2001 From: Matej Lednicky Date: Wed, 29 Nov 2023 09:52:44 +0100 Subject: [PATCH] chore: Update README and gitignore file --- .gitignore | 38 -------------------------------------- README.md | 20 ++++++++++---------- 2 files changed, 10 insertions(+), 48 deletions(-) diff --git a/.gitignore b/.gitignore index 58ad522..f534f90 100644 --- a/.gitignore +++ b/.gitignore @@ -15,44 +15,6 @@ jsconfig.json .idea .env -# common node files and folders -# https://github.com/github/gitignore/blob/master/Node.gitignore -lib-cov -*.seed -*.log -*.csv -*.dat -*.out -*.pid -*.gz - -pids -logs -results - -build/Release # Compiled binary addons (http://nodejs.org/api/addons.html) - -# always-ignore extensions -*.diff -*.err -*.orig -*.rej -*.swo -*.swp -*.vi -*~ -*.sass-cache - # project specific -.next node_modules -build -build-aws -types dist - -# tests -**/e2e/screenshots -**/cypress/screenshots -**/cypress/videos -**/cypress/fixtures diff --git a/README.md b/README.md index 47a9e26..e6dfa70 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ As HTML button: @@ -29,7 +29,7 @@ Or using JavaScript: // you only need to configure settings once window.tfEmbedAdmin.configure({ type: 'iframe' }) - const callback = (action, formId) => { + const callback = (action, { formId }) => { console.log(`you have selected form with id ${formId}`) } @@ -63,7 +63,7 @@ window.tfEmbedAdmin.configure({ }) ``` -When using HTML API you don't need to call this method separately. You need to speciffy config options on the button itself. +When using HTML API you don't need to call this method separately. You need to specify config options on the button itself. ### selectForm(callback) @@ -71,9 +71,9 @@ Open embed admin to select form or create a new one. It accepts `callback` method: -| name | type | description | -| -------- | ------------------------------------------ | --------------------------------------------------------------------------- | -| callback | `(action: string, formId: string) => void` | Method to be called when a form is selected or edited in Typeform Admin UI. | +| name | type | description | +| -------- | ------------------------------------------------------- | ----------------------------------------------------------------- | +| callback | `(action: string, payload: { formId: string }) => void` | Method to be called when a form is selected in Typeform Admin UI. | Example with JavaScript: @@ -105,10 +105,10 @@ Open embed admin to edit a specific form. It accepts `formId` string and `callback` method: -| name | type | description | -| -------- | ------------------------------------------ | --------------------------------------------------------------------------- | -| formId | `string` | ID of the typeform to edit | -| callback | `(action: string, formId: string) => void` | Method to be called when a form is selected or edited in Typeform Admin UI. | +| name | type | description | +| -------- | ------------------------------------------------------- | --------------------------------------------------------------- | +| formId | `string` | ID of the typeform to edit | +| callback | `(action: string, payload: { formId: string }) => void` | Method to be called when a form is edited in Typeform Admin UI. | Example with JavaScript: