import React from 'react'; interface VehicleAttribute { key: string; name: string; value: string; } interface VehicleAttributesTooltipProps { show: boolean; position: { x: number; y: number }; vehicleName?: string; vehicleAttributes: VehicleAttribute[]; onMouseEnter?: () => void; onMouseLeave?: () => void; imageUrl?: string; // опционально, для будущего } const VehicleAttributesTooltip: React.FC = ({ show, position, vehicleAttributes, onMouseEnter, onMouseLeave, imageUrl, }) => { if (!show) return null; return (
{/* Фоновое изображение, если будет нужно */} {imageUrl && ( vehicle background )}
{vehicleAttributes.map((attr, idx) => (
{attr.name}
{attr.value}
))}
); }; export default VehicleAttributesTooltip;