Enhance SheetHeader
tooltips: add hoverable tooltips for attribute names.
This commit is contained in:
@@ -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>
|
||||
))}
|
||||
|
Reference in New Issue
Block a user