- refactor context menu and action bar into seperate components

- fix styling context menu
This commit is contained in:
brendanlaschke
2023-08-10 21:30:25 +02:00
parent 807506549a
commit b76f01d930
16 changed files with 337 additions and 82 deletions

View File

@ -0,0 +1,16 @@
import React from 'react';
import { useRecoilValue } from 'recoil';
import { ContextMenu } from '@/ui/context-menu/components/ContextMenu';
import { selectedRowIdsSelector } from '../../states/selectedRowIdsSelector';
type OwnProps = {
children: React.ReactNode | React.ReactNode[];
};
export function EntityTableContextMenu({ children }: OwnProps) {
const selectedRowIds = useRecoilValue(selectedRowIdsSelector);
return <ContextMenu selectedIds={selectedRowIds}>{children}</ContextMenu>;
}