Skip to content

Commit

Permalink
fix(react-grid-layout): fix react-grid-layout type imports (#125)
Browse files Browse the repository at this point in the history
Co-authored-by: kseniyakuzina <kseniyakuzina@yandex-team.ru>
  • Loading branch information
kseniya57 and kseniyakuzina committed Mar 15, 2024
1 parent 6c071e1 commit 2a051cf
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/typings/common.ts
Original file line number Diff line number Diff line change
@@ -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<MenuItem>;
Expand Down
4 changes: 2 additions & 2 deletions src/typings/plugin.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';

import type {ReactGridLayoutProps} from 'react-grid-layout';
import ReactGridLayout from 'react-grid-layout';

import {
ConfigItem,
Expand Down Expand Up @@ -30,7 +30,7 @@ export interface PluginWidgetProps<T = StringParams> {
settings: SettingsProps;
context: ContextProps;
layout: WidgetLayout[];
gridLayout: ReactGridLayoutProps;
gridLayout: ReactGridLayout.ReactGridLayoutProps;
adjustWidgetLayout: (data: {
widgetId: string;
needSetDefault?: boolean;
Expand Down
4 changes: 2 additions & 2 deletions src/utils/register-manager.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type {ReactGridLayoutProps} from 'react-grid-layout';
import ReactGridLayout from 'react-grid-layout';

import {Plugin, PluginDefaultLayout, Settings} from '../typings';

Expand Down Expand Up @@ -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],
Expand Down

0 comments on commit 2a051cf

Please sign in to comment.