How to use the webiny-plugins.unregisterPlugin function in webiny-plugins

To help you get started, we’ve selected a few webiny-plugins examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github webiny / webiny-js / packages / webiny-app-page-builder / src / admin / components / withSavedElements / Title.js View on Github external
showConfirmation(async () => {
                const { data: res } = await deleteElement({
                    variables: { id }
                });

                const { error } = res.pageBuilder.deleteElement;
                if (error) {
                    return showSnackbar(error.message);
                }

                unregisterPlugin(plugin);

                refresh();

                showSnackbar(
                    <span>
                        Element <strong>{title}</strong> deleted!
                    </span>
                );
            });
        },
github webiny / webiny-js / packages / webiny-app-cms / src / editor / plugins / blockEditing / SearchBlocks.js View on Github external
deleteBlock = async ({ plugin, deleteElement }) => {
        const { showSnackbar } = this.props;
        const response = await deleteElement({
            variables: {
                id: plugin.id
            }
        });

        const { error } = response.data.cms.pageBuilder.deleteElement;
        if (error) {
            showSnackbar(error.message);
            return;
        }

        unregisterPlugin(plugin.name);
        showSnackbar("Block " + plugin.title + " successfully deleted.");
    };
github webiny / webiny-js / packages / webiny-app-page-builder / src / editor / plugins / blockEditing / SearchBlocks.js View on Github external
deleteBlock = async ({ plugin, deleteElement }) => {
        const { showSnackbar } = this.props;
        const response = await deleteElement({
            variables: {
                id: plugin.id
            }
        });

        const { error } = response.data.pageBuilder.deleteElement;
        if (error) {
            showSnackbar(error.message);
            return;
        }

        unregisterPlugin(plugin.name);
        showSnackbar("Block " + plugin.title + " successfully deleted.");
    };

webiny-plugins

A simple registry that stores all plugins in a shared object.

MIT
Latest version published 5 years ago

Package Health Score

66 / 100
Full package analysis