import React from 'react'; import { Layouts, Responsive, WidthProvider } from 'react-grid-layout'; import clsx from 'clsx'; import { DashboardGridItem } from './items'; import { DashboardItem } from '../../store/dashboard'; import 'react-grid-layout/css/styles.css'; import 'react-resizable/css/styles.css'; const ResponsiveGridLayout = WidthProvider(Responsive); interface DashboardGridProps { isEditMode: boolean; items: DashboardItem[]; layouts: Layouts; onChangeLayouts: (layouts: Layouts) => void; } export const DashboardGrid: React.FC = React.memo( (props) => { const { layouts, onChangeLayouts, items, isEditMode } = props; return ( { onChangeLayouts(allLayouts); }} > {items.map((item) => (
))}
); } ); DashboardGrid.displayName = 'DashboardGrid';