Enhance SheetHeader tooltips: add hoverable tooltips for attribute names.

This commit is contained in:
2025-07-06 22:36:18 +02:00
parent fd11a2efe0
commit 87a533858a

View File

@@ -91,7 +91,12 @@ export default function SheetHeader({jsonData}: { jsonData: CharacterData }) {
<div className="flex justify-between">
{attributes.map(attr => (
<div key={attr.id} className="w-[10%] text-center">
<div className="font-bold">{attr.short}</div>
<div className="relative group cursor-help">
<div className="font-bold">{attr.short}</div>
<span className="absolute left-1/2 transform -translate-x-1/2 bottom-full mb-1 px-2 py-1 bg-gray-800 text-white text-xs rounded opacity-0 group-hover:opacity-100 transition-opacity duration-200 whitespace-nowrap">
{attr.name}
</span>
</div>
<div>{attr.value}</div>
</div>
))}