feat(editor): Add registerCustomAction to new canvas (no-changelog) (#10359)

This commit is contained in:
Alex Grozav
2024-08-16 10:45:12 +03:00
committed by GitHub
parent c5a0c049ea
commit 90a5fcc541
4 changed files with 40 additions and 27 deletions

View File

@@ -10,7 +10,7 @@ const state = reactive({
delegatedClickHandler: null as null | ((e: MouseEvent) => void),
});
export default () => {
export function useGlobalLinkActions() {
function registerCustomAction({ key, action }: { key: string; action: Function }) {
state.customActions[key] = action;
}
@@ -76,4 +76,4 @@ export default () => {
registerCustomAction,
unregisterCustomAction,
};
};
}