From 6445aa18740704ff85af5dc5f0ce71fc3701a9a2 Mon Sep 17 00:00:00 2001 From: ViridianCitrus Date: Thu, 9 Feb 2023 19:49:20 -0500 Subject: [PATCH] Add tooltip to GameIcon --- src/components/Atoms/GameIcon.tsx | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/components/Atoms/GameIcon.tsx b/src/components/Atoms/GameIcon.tsx index f6f0aad2..820798a3 100644 --- a/src/components/Atoms/GameIcon.tsx +++ b/src/components/Atoms/GameIcon.tsx @@ -1,3 +1,5 @@ +import Tooltip from 'rc-tooltip'; + const game_icons: { [key: string]: { [key: string]: string } } = { minecraft: { vanilla: '/assets/minecraft-vanilla.png', @@ -21,10 +23,20 @@ export default function GameIcon({ if (game_flavour in game_icons[game_type]) icon = game_icons[game_type][game_flavour]; return ( - { + game_type.charAt(0).toUpperCase() + game_type.slice(1)} - {game_flavour.charAt(0).toUpperCase() + game_flavour.slice(1) + }} + placement="bottom" + trigger={['hover']} + mouseEnterDelay={0.2} + > + {game_type} + ); }