diff --git a/src/app/tools/compare/components/CompareTable.tsx b/src/app/tools/compare/components/CompareTable.tsx index 2f4bd3180..18b986247 100644 --- a/src/app/tools/compare/components/CompareTable.tsx +++ b/src/app/tools/compare/components/CompareTable.tsx @@ -509,7 +509,7 @@ export function CompareTable({ stats }: CompareTableProps) { { + onConsumablesChange={(consumables) => { mutateCompareEphemeral((draft) => { draft.members[index].consumables = consumables; }); diff --git a/src/app/tools/tankopedia/[id]/components/Characteristics/components/ConfigurationChildWrapper.tsx b/src/app/tools/tankopedia/[id]/components/Characteristics/components/ConfigurationChildWrapper.tsx index f164672eb..ed5fe5977 100644 --- a/src/app/tools/tankopedia/[id]/components/Characteristics/components/ConfigurationChildWrapper.tsx +++ b/src/app/tools/tankopedia/[id]/components/Characteristics/components/ConfigurationChildWrapper.tsx @@ -10,7 +10,12 @@ export function ConfigurationChildWrapper({ ...props }: ConfigurationChildWrapperProps) { return ( - + {children} ); diff --git a/src/app/tools/tankopedia/[id]/components/Characteristics/components/Consumables.tsx b/src/app/tools/tankopedia/[id]/components/Characteristics/components/Consumables.tsx index dfdb633b6..52e63878c 100644 --- a/src/app/tools/tankopedia/[id]/components/Characteristics/components/Consumables.tsx +++ b/src/app/tools/tankopedia/[id]/components/Characteristics/components/Consumables.tsx @@ -77,11 +77,12 @@ export function Consumables() { hasConsumableDeliverySystem={hasConsumableDeliverySystem} hasHighEndConsumables={hasHighEndConsumables} timers - onChange={(consumables) => { + onConsumablesChange={(consumables) => { mutateDuel((draft) => { draft.protagonist.consumables = consumables; }); }} + justify={{ initial: 'center', sm: 'start' }} /> ); diff --git a/src/app/tools/tankopedia/[id]/components/Characteristics/components/Modules.tsx b/src/app/tools/tankopedia/[id]/components/Characteristics/components/Modules.tsx index c39d86a8c..3d566aa11 100644 --- a/src/app/tools/tankopedia/[id]/components/Characteristics/components/Modules.tsx +++ b/src/app/tools/tankopedia/[id]/components/Characteristics/components/Modules.tsx @@ -214,9 +214,7 @@ export function Modules() { align="center" direction="column" gap="2" - style={{ - position: 'relative', - }} + position="relative" > {unlock.cost.value > 0 && ( <> diff --git a/src/app/tools/tankopedia/[id]/components/Model/CharacteristicsSection.tsx b/src/app/tools/tankopedia/[id]/components/Model/CharacteristicsSection.tsx index 14389122e..f7a2be54e 100644 --- a/src/app/tools/tankopedia/[id]/components/Model/CharacteristicsSection.tsx +++ b/src/app/tools/tankopedia/[id]/components/Model/CharacteristicsSection.tsx @@ -12,11 +12,17 @@ export function CharacteristicsSection() { - + Configuration @@ -27,14 +33,14 @@ export function CharacteristicsSection() { - Characteristics + + Characteristics + diff --git a/src/app/tools/tankopedia/[id]/components/Model/GameModeSection.tsx b/src/app/tools/tankopedia/[id]/components/Model/GameModeSection.tsx index 974bd17d4..46b1a60fc 100644 --- a/src/app/tools/tankopedia/[id]/components/Model/GameModeSection.tsx +++ b/src/app/tools/tankopedia/[id]/components/Model/GameModeSection.tsx @@ -27,7 +27,7 @@ export function GameModeSection() { return ( - + Overview diff --git a/src/components/ConsumablesManager.tsx b/src/components/ConsumablesManager.tsx index e10c78f2b..1448b1c31 100644 --- a/src/components/ConsumablesManager.tsx +++ b/src/components/ConsumablesManager.tsx @@ -1,30 +1,31 @@ -import { Flex } from '@radix-ui/themes'; +import { Flex, FlexProps } from '@radix-ui/themes'; import { ConsumableEntry } from '../core/blitzkit/consumableDefinitions'; import { ConsumableButton } from './ModuleButtons/ConsumableButton'; -interface ConsumablesManagerProps { +type ConsumablesManagerProps = FlexProps & { consumables: ConsumableEntry[]; selected: number[]; - onChange?: (consumables: number[]) => void; + onConsumablesChange?: (consumables: number[]) => void; disabled?: boolean; timers?: boolean; hasHighEndConsumables?: boolean; hasConsumableDeliverySystem?: boolean; cooldownBooster?: number; -} +}; export function ConsumablesManager({ consumables, selected, - onChange, + onConsumablesChange, disabled, timers, hasConsumableDeliverySystem, cooldownBooster, hasHighEndConsumables, + ...props }: ConsumablesManagerProps) { return ( - + {consumables.map((consumable, index) => { const isSelected = selected.some((id) => id === consumable.id); @@ -50,7 +51,7 @@ export function ConsumablesManager({ consumable={consumable.id} selected={isSelected} onClick={() => { - if (!onChange) return; + if (!onConsumablesChange) return; const draft = [...selected]; @@ -60,7 +61,7 @@ export function ConsumablesManager({ draft.push(consumable.id); } - onChange(draft); + onConsumablesChange(draft); }} /> ); diff --git a/src/components/ModuleButtons/ConsumableButton.tsx b/src/components/ModuleButtons/ConsumableButton.tsx index 58749eb64..8cc8295ba 100644 --- a/src/components/ModuleButtons/ConsumableButton.tsx +++ b/src/components/ModuleButtons/ConsumableButton.tsx @@ -25,6 +25,7 @@ export function ConsumableButton({ return (