mirror of
https://github.com/mathuo/dockview
synced 2025-02-15 21:05:45 +00:00
chore: fix import
This commit is contained in:
parent
67fee68ebe
commit
2f0e34c99f
@ -2,7 +2,6 @@ import React from 'react';
|
|||||||
import {
|
import {
|
||||||
DockviewComponent,
|
DockviewComponent,
|
||||||
DockviewWillDropEvent,
|
DockviewWillDropEvent,
|
||||||
GroupPanelFrameworkComponentFactory,
|
|
||||||
DockviewApi,
|
DockviewApi,
|
||||||
IContentRenderer,
|
IContentRenderer,
|
||||||
ITabRenderer,
|
ITabRenderer,
|
||||||
@ -81,46 +80,6 @@ function extractCoreOptions(props: IDockviewReactProps): DockviewOptions {
|
|||||||
return coreOptions as 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(
|
export const DockviewReact = React.forwardRef(
|
||||||
(props: IDockviewReactProps, ref: React.ForwardedRef<HTMLDivElement>) => {
|
(props: IDockviewReactProps, ref: React.ForwardedRef<HTMLDivElement>) => {
|
||||||
const domRef = React.useRef<HTMLDivElement>(null);
|
const domRef = React.useRef<HTMLDivElement>(null);
|
||||||
|
Loading…
Reference in New Issue
Block a user