feat: add Table and TableSection components (#1849)
* refactor: rename ui/table to ui/data-table * feat: add Table and TableSection components Closes #1806
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
import styled from '@emotion/styled';
|
||||
|
||||
import { DropdownButton } from '@/ui/dropdown/components/DropdownButton';
|
||||
|
||||
import {
|
||||
EntityTableHeaderOptionsProps,
|
||||
TableColumnDropdownMenu,
|
||||
} from './TableColumnDropdownMenu';
|
||||
|
||||
const StyledDropdownContainer = styled.div`
|
||||
left: 0px;
|
||||
position: absolute;
|
||||
top: 32px;
|
||||
z-index: 1;
|
||||
`;
|
||||
|
||||
export const EntityTableHeaderOptions = ({
|
||||
isFirstColumn,
|
||||
isLastColumn,
|
||||
primaryColumnKey,
|
||||
column,
|
||||
}: EntityTableHeaderOptionsProps) => {
|
||||
return (
|
||||
<StyledDropdownContainer>
|
||||
<DropdownButton
|
||||
dropdownId={column.key + '-header'}
|
||||
dropdownComponents={
|
||||
<TableColumnDropdownMenu
|
||||
column={column}
|
||||
isFirstColumn={isFirstColumn}
|
||||
isLastColumn={isLastColumn}
|
||||
primaryColumnKey={primaryColumnKey}
|
||||
/>
|
||||
}
|
||||
dropdownHotkeyScope={{ scope: column.key + '-header' }}
|
||||
/>
|
||||
</StyledDropdownContainer>
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user