fix: better performance titles

This commit is contained in:
tresabhi committed 2024-11-14 20:55:22 -06:00
1 parent d9958558b5
commit b45ec7ae9e
1 file changed
+6 -7
@@ -3,7 +3,7 @@ import {
CaretSortIcon, CaretSortIcon,
CaretUpIcon, CaretUpIcon,
} from '@radix-ui/react-icons'; } from '@radix-ui/react-icons';
import { Flex, IconButton, Table } from '@radix-ui/themes'; import { Button, Flex, Table } from '@radix-ui/themes';
import { TankPerformanceSort } from '../../stores/tankPerformanceSort'; import { TankPerformanceSort } from '../../stores/tankPerformanceSort';
import { import {
TankPerformanceSortTypeNames, TankPerformanceSortTypeNames,
@@ -30,11 +30,8 @@ export function Header() {
justify="center" justify="center"
> >
<Flex align="center" gap="1"> <Flex align="center" gap="1">
{TankPerformanceSortTypeNames[type]} <Button
variant="ghost"
<IconButton
size={isSelected ? '1' : '2'}
variant={isSelected ? 'soft' : 'ghost'}
color={isSelected ? undefined : 'gray'} color={isSelected ? undefined : 'gray'}
highContrast={!isSelected} highContrast={!isSelected}
onClick={() => { onClick={() => {
@@ -45,6 +42,8 @@ export function Header() {
} }
}} }}
> >
{TankPerformanceSortTypeNames[type]}
{!isSelected && <CaretSortIcon />} {!isSelected && <CaretSortIcon />}
{isSelected && ( {isSelected && (
<> <>
@@ -52,7 +51,7 @@ export function Header() {
{sort.direction === -1 && <CaretDownIcon />} {sort.direction === -1 && <CaretDownIcon />}
</> </>
)} )}
</IconButton> </Button>
</Flex> </Flex>
</StickyColumnHeaderCell> </StickyColumnHeaderCell>
); );