init: the first public commit for AFFiNE
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
import { AsyncBlock, BlockEditor } from '../editor';
|
||||
import type { FC, ReactElement } from 'react';
|
||||
import { BlockPendantProvider } from '../block-pendant';
|
||||
import { DragDropWrapper } from '../drag-drop-wrapper';
|
||||
|
||||
type BlockContentWrapperProps = {
|
||||
block: AsyncBlock;
|
||||
editor: BlockEditor;
|
||||
children: ReactElement | null;
|
||||
};
|
||||
|
||||
export const WrapperWithPendantAndDragDrop: FC<BlockContentWrapperProps> =
|
||||
function ({ block, children, editor }) {
|
||||
return (
|
||||
<DragDropWrapper block={block} editor={editor}>
|
||||
<BlockPendantProvider block={block}>
|
||||
{children}
|
||||
</BlockPendantProvider>
|
||||
</DragDropWrapper>
|
||||
);
|
||||
};
|
||||
@@ -0,0 +1 @@
|
||||
export * from './BlockContentWrapper';
|
||||
Reference in New Issue
Block a user