mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 21:27:20 +00:00
fix(core): canDrop check for external (#9058)
This commit is contained in:
13
packages/frontend/component/src/ui/dnd/context.ts
Normal file
13
packages/frontend/component/src/ui/dnd/context.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { createContext } from 'react';
|
||||
|
||||
import type { DNDData, ExternalDataAdapter } from './types';
|
||||
|
||||
export const DNDContext = createContext<{
|
||||
/**
|
||||
* external data adapter.
|
||||
* if this is provided, the drop target will handle external elements as well.
|
||||
*
|
||||
* @default undefined
|
||||
*/
|
||||
externalDataAdapter?: ExternalDataAdapter<DNDData>;
|
||||
}>({});
|
||||
Reference in New Issue
Block a user