import { observer } from 'mobx-react-lite'; import React, { ReactNode, useEffect, useLayoutEffect } from 'react'; import { Box } from '@wix/design-system'; import { FiltersMap } from '@wix/bex-core'; import { GridBaseState } from '../../state'; export interface GridFoldersSectionProps { dataHook?: string; state: GridBaseState; header?: ReactNode; children?: ReactNode; } function _GridFoldersSection( props: GridFoldersSectionProps, ) { const { dataHook, state, header, children } = props; const { toolbar: { contentPaddingPx }, } = state; useLayoutEffect(() => state._containerRectState._sync(), []); useEffect(() => state._containerRectState.init(), []); return (
{header}
{ state._containerRectState.element = el; }} > {children}
); } export const GridFoldersSection = observer(_GridFoldersSection);