mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 11:39:50 +02:00
27 lines
710 B
TypeScript
27 lines
710 B
TypeScript
import { renderCharacteristic } from "../hooks/useCharacteristicRenderer";
|
|
import type { CharacteristicOutput } from "../tankopedia/characteristics";
|
|
import type { CharacteristicRenderConfig } from "../tankopedia/characteristicsOrder";
|
|
|
|
interface Props {
|
|
characteristic: CharacteristicOutput;
|
|
others: CharacteristicOutput[];
|
|
config: CharacteristicRenderConfig;
|
|
}
|
|
|
|
export function TankopediaCharacteristic({
|
|
characteristic,
|
|
others,
|
|
config,
|
|
}: Props) {
|
|
if (characteristic === null) return null;
|
|
|
|
const rendered = renderCharacteristic(characteristic, config);
|
|
|
|
return (
|
|
<p>
|
|
{config.name}: {rendered} {config.units && `${config.units}`} (1 /{" "}
|
|
{others.length})
|
|
</p>
|
|
);
|
|
}
|