mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 03:29:51 +02:00
feat: some migration
This commit is contained in:
1 parent
e06aaa4bcf
commit
02aed3e3a5
25 files changed
+637
-73
No files matched your search
@@ -84,7 +84,7 @@ export function Row({
|
||||
displayType === 'tank'
|
||||
? type === TankType.COLLECTOR
|
||||
? theme.textLowContrast_blue
|
||||
: treeType === 'premium'
|
||||
: type === TankType.PREMIUM
|
||||
? theme.textLowContrast_amber
|
||||
: theme.textHighContrast
|
||||
: theme.textLowContrast,
|
||||
|
||||
@@ -1,19 +1,23 @@
|
||||
import { TankClass, TREE_TYPE_ICONS, TreeType } from '@blitzkit/core';
|
||||
import { TankClass, TankType, TREE_TYPE_ICONS } from '@blitzkit/core';
|
||||
import { theme } from '../../../../stitches.config';
|
||||
|
||||
export interface ItemProps {
|
||||
tankType?: TankClass;
|
||||
tankClass?: TankClass;
|
||||
name: string;
|
||||
treeType: TreeType;
|
||||
tankType: TankType;
|
||||
}
|
||||
|
||||
const TREE_TYPE_COLOR = {
|
||||
researchable: '',
|
||||
premium: '_amber',
|
||||
collector: '_blue',
|
||||
[TankType.RESEARCHABLE]: '',
|
||||
[TankType.PREMIUM]: '_amber',
|
||||
[TankType.COLLECTOR]: '_blue',
|
||||
} as const;
|
||||
|
||||
export function Item({ tankType, name, treeType }: ItemProps) {
|
||||
export function Item({
|
||||
tankClass: tankType,
|
||||
name,
|
||||
tankType: treeType,
|
||||
}: ItemProps) {
|
||||
return (
|
||||
<div
|
||||
style={{
|
||||
@@ -40,7 +44,7 @@ export function Item({ tankType, name, treeType }: ItemProps) {
|
||||
>
|
||||
{tankType && (
|
||||
<img
|
||||
alt={tankType}
|
||||
alt={TankType[tankType]}
|
||||
src={TREE_TYPE_ICONS[treeType][tankType]}
|
||||
style={{ width: 14, height: 14 }}
|
||||
/>
|
||||
|
||||
Reference in new issue
Block a user