mirror of
https://github.com/mathuo/dockview
synced 2025-02-13 20:05:46 +00:00
chore: fix import
This commit is contained in:
parent
67fee68ebe
commit
2f0e34c99f
@ -2,7 +2,6 @@ import React from 'react';
|
||||
import {
|
||||
DockviewComponent,
|
||||
DockviewWillDropEvent,
|
||||
GroupPanelFrameworkComponentFactory,
|
||||
DockviewApi,
|
||||
IContentRenderer,
|
||||
ITabRenderer,
|
||||
@ -81,46 +80,6 @@ function extractCoreOptions(props: IDockviewReactProps): DockviewOptions {
|
||||
return coreOptions as DockviewOptions;
|
||||
}
|
||||
|
||||
function createFrameworkFactory(
|
||||
addPortal: (portal: React.ReactPortal) => IDockviewDisposable
|
||||
): GroupPanelFrameworkComponentFactory {
|
||||
return {
|
||||
content: {
|
||||
createComponent: (
|
||||
_id: string,
|
||||
componentId: string,
|
||||
component: React.FunctionComponent<IDockviewPanelProps>
|
||||
): IContentRenderer => {
|
||||
return new ReactPanelContentPart(componentId, component, {
|
||||
addPortal,
|
||||
});
|
||||
},
|
||||
},
|
||||
tab: {
|
||||
createComponent: (
|
||||
_id: string,
|
||||
componentId: string,
|
||||
component: React.FunctionComponent<IDockviewPanelHeaderProps>
|
||||
): ITabRenderer => {
|
||||
return new ReactPanelHeaderPart(componentId, component, {
|
||||
addPortal,
|
||||
});
|
||||
},
|
||||
},
|
||||
watermark: {
|
||||
createComponent: (
|
||||
_id: string,
|
||||
componentId: string,
|
||||
component: React.FunctionComponent<{}>
|
||||
) => {
|
||||
return new ReactWatermarkPart(componentId, component, {
|
||||
addPortal,
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
export const DockviewReact = React.forwardRef(
|
||||
(props: IDockviewReactProps, ref: React.ForwardedRef<HTMLDivElement>) => {
|
||||
const domRef = React.useRef<HTMLDivElement>(null);
|
||||
|
Loading…
Reference in New Issue
Block a user