diff --git a/src/typings/common.ts b/src/typings/common.ts index b1505c5..3469039 100644 --- a/src/typings/common.ts +++ b/src/typings/common.ts @@ -1,10 +1,10 @@ -import type {ReactGridLayoutProps} from 'react-grid-layout'; +import type ReactGridLayout from 'react-grid-layout'; import {OverlayCustomControlItem} from '../components/OverlayControls/OverlayControls'; import {MenuItems} from '../constants'; export interface Settings { - gridLayout?: ReactGridLayoutProps; + gridLayout?: ReactGridLayout.ReactGridLayoutProps; theme?: string; isMobile?: boolean; menu?: Array; diff --git a/src/typings/plugin.ts b/src/typings/plugin.ts index 9c27461..a19598b 100644 --- a/src/typings/plugin.ts +++ b/src/typings/plugin.ts @@ -1,6 +1,6 @@ import React from 'react'; -import type {ReactGridLayoutProps} from 'react-grid-layout'; +import ReactGridLayout from 'react-grid-layout'; import { ConfigItem, @@ -30,7 +30,7 @@ export interface PluginWidgetProps { settings: SettingsProps; context: ContextProps; layout: WidgetLayout[]; - gridLayout: ReactGridLayoutProps; + gridLayout: ReactGridLayout.ReactGridLayoutProps; adjustWidgetLayout: (data: { widgetId: string; needSetDefault?: boolean; diff --git a/src/utils/register-manager.ts b/src/utils/register-manager.ts index 9f98b52..69da9c0 100644 --- a/src/utils/register-manager.ts +++ b/src/utils/register-manager.ts @@ -1,4 +1,4 @@ -import type {ReactGridLayoutProps} from 'react-grid-layout'; +import ReactGridLayout from 'react-grid-layout'; import {Plugin, PluginDefaultLayout, Settings} from '../typings'; @@ -29,7 +29,7 @@ export class RegisterManager { minW: 4, minH: 2, }; - private _gridLayout: ReactGridLayoutProps = { + private _gridLayout: ReactGridLayout.ReactGridLayoutProps = { rowHeight: 18, cols: 36, margin: [2, 2],