Skip to content

Commit

Permalink
added forge and paper icons
Browse files Browse the repository at this point in the history
  • Loading branch information
Arcslogger committed Feb 20, 2023
1 parent 3d205bf commit 4611c12
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
Binary file added public/assets/minecraft-forge.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/minecraft-paper.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 10 additions & 9 deletions src/components/Atoms/GameIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ const game_icons: { [key: string]: { [key: string]: string } } = {
minecraft: {
vanilla: '/assets/minecraft-vanilla.png',
fabric: '/assets/minecraft-fabric.png',
forge: '/assets/minecraft-forge.png',
paper: '/assets/minecraft-paper.png',
},
};

Expand All @@ -12,7 +14,7 @@ const unknown_icon = '/assets/minecraft-missing-texture.svg';
export default function GameIcon({
game_type,
game_flavour,
className = 'h-8 w-8',
className = 'h-8 w-8 rounded-sm',
}: {
game_type: string;
game_flavour: string;
Expand All @@ -25,18 +27,17 @@ export default function GameIcon({
return (
<Tooltip
showArrow={false}
overlay={<span>{
game_type.charAt(0).toUpperCase() + game_type.slice(1)} - {game_flavour.charAt(0).toUpperCase() + game_flavour.slice(1)
}</span>}
overlay={
<span>
{game_type.charAt(0).toUpperCase() + game_type.slice(1)} -{' '}
{game_flavour.charAt(0).toUpperCase() + game_flavour.slice(1)}
</span>
}
placement="bottom"
trigger={['hover']}
mouseEnterDelay={0.2}
>
<img
src={icon}
alt={game_type}
className={`${className}`}
/>
<img src={icon} alt={game_type} className={`${className}`} />
</Tooltip>
);
}

0 comments on commit 4611c12

Please sign in to comment.