mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-25 03:29:51 +01:00
feat: smaller tank card
This commit is contained in:
1 parent
127ffc787e
commit
595941ab9c
2 files changed
+20
-6
No files matched your search
@@ -10,7 +10,11 @@ import { Tanks } from './Tanks';
|
|||||||
export function TankTable() {
|
export function TankTable() {
|
||||||
return (
|
return (
|
||||||
<Flex justify="center">
|
<Flex justify="center">
|
||||||
<StickyTableRoot variant="surface" style={{ maxWidth: '100%' }}>
|
<StickyTableRoot
|
||||||
|
size={{ initial: '1', sm: '2' }}
|
||||||
|
variant="surface"
|
||||||
|
style={{ maxWidth: '100%' }}
|
||||||
|
>
|
||||||
<Header />
|
<Header />
|
||||||
<Suspense fallback={<BodyLoader />}>
|
<Suspense fallback={<BodyLoader />}>
|
||||||
<Tanks />
|
<Tanks />
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { IconButton, Table } from '@radix-ui/themes';
|
import { Table } from '@radix-ui/themes';
|
||||||
import { TankDefinition } from '../core/blitzkit/tankDefinitions';
|
import { TankDefinition } from '../core/blitzkit/tankDefinitions';
|
||||||
import { tankIcon } from '../core/blitzkit/tankIcon';
|
import { tankIcon } from '../core/blitzkit/tankIcon';
|
||||||
import { classIcons } from './ClassIcon';
|
import { classIcons } from './ClassIcon';
|
||||||
@@ -19,6 +19,8 @@ export function TankRowHeaderCell({ tank }: TankRowHeaderCellProps) {
|
|||||||
position: 'sticky',
|
position: 'sticky',
|
||||||
left: 0,
|
left: 0,
|
||||||
backgroundColor: 'var(--color-background)',
|
backgroundColor: 'var(--color-background)',
|
||||||
|
maxWidth: 240,
|
||||||
|
overflow: 'hidden',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Link href={`/tools/tankopedia/${tank.id}`} tabIndex={-1}>
|
<Link href={`/tools/tankopedia/${tank.id}`} tabIndex={-1}>
|
||||||
@@ -52,16 +54,24 @@ export function TankRowHeaderCell({ tank }: TankRowHeaderCellProps) {
|
|||||||
display: 'flex',
|
display: 'flex',
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
gap: 'var(--space-1)',
|
gap: 'var(--space-1)',
|
||||||
|
whiteSpace: 'nowrap',
|
||||||
|
overflow: 'hidden',
|
||||||
|
textOverflow: 'ellipsis',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Icon width="1em" height="1em" />
|
<Icon
|
||||||
|
width="1em"
|
||||||
|
height="1em"
|
||||||
|
style={{
|
||||||
|
minWidth: '1em',
|
||||||
|
minHeight: '1em',
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
|
||||||
{tank.name}
|
{tank.name}
|
||||||
|
|
||||||
{tank.testing && (
|
{tank.testing && (
|
||||||
<IconButton size="1" ml="1">
|
<ScienceIcon style={{ width: '1em', height: '1em' }} />
|
||||||
<ScienceIcon style={{ width: '1em', height: '1em' }} />
|
|
||||||
</IconButton>
|
|
||||||
)}
|
)}
|
||||||
</Link>
|
</Link>
|
||||||
</Table.RowHeaderCell>
|
</Table.RowHeaderCell>
|
||||||
|
|||||||
Reference in new issue
Block a user