Files
coopgo/node_modules/react-dnd/lib/internals/registration.js
sgauthier 6e64e138e2
All checks were successful
Publish To Prod / deploy_and_publish (push) Successful in 35s
planning
2024-10-14 09:15:30 +02:00

11 lines
438 B
JavaScript

export function registerTarget(type, target, manager) {
const registry = manager.getRegistry();
const targetId = registry.addTarget(type, target);
return [targetId, () => registry.removeTarget(targetId)];
}
export function registerSource(type, source, manager) {
const registry = manager.getRegistry();
const sourceId = registry.addSource(type, source);
return [sourceId, () => registry.removeSource(sourceId)];
}