mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-19 20:03:51 +01:00
feat: sticky headers
This commit is contained in:
1 parent
3244a0fd8a
commit
7eb13c199b
10 files changed
+48
-46
No files matched your search
@@ -6,6 +6,7 @@ import {
|
||||
CaretUpIcon,
|
||||
} from '@radix-ui/react-icons';
|
||||
import { Flex, IconButton, Table } from '@radix-ui/themes';
|
||||
import { StickyColumnHeaderCell } from '../../../../components/StickyColumnHeaderCell';
|
||||
import * as TankPerformanceSort from '../../../../stores/tankPerformanceSort';
|
||||
import {
|
||||
tankPerformanceSortTypeNames,
|
||||
@@ -19,17 +20,16 @@ export function Header() {
|
||||
return (
|
||||
<Table.Header>
|
||||
<Table.Row align="center">
|
||||
<Table.ColumnHeaderCell>Tank</Table.ColumnHeaderCell>
|
||||
<StickyColumnHeaderCell>Tank</StickyColumnHeaderCell>
|
||||
{tankPerformanceSortTypeNamesArray.map((type) => {
|
||||
const isSelected = sort.type === type;
|
||||
|
||||
return (
|
||||
<Table.ColumnHeaderCell
|
||||
<StickyColumnHeaderCell
|
||||
px="2"
|
||||
key={type}
|
||||
width="0"
|
||||
justify="center"
|
||||
minWidth="0px"
|
||||
>
|
||||
<Flex align="center" gap="1">
|
||||
{tankPerformanceSortTypeNames[type]}
|
||||
@@ -56,7 +56,7 @@ export function Header() {
|
||||
)}
|
||||
</IconButton>
|
||||
</Flex>
|
||||
</Table.ColumnHeaderCell>
|
||||
</StickyColumnHeaderCell>
|
||||
);
|
||||
})}
|
||||
</Table.Row>
|
||||
|
||||
Reference in new issue
Block a user