From a0dd1b46015a909cf064a5d9d43e17c0a2a6436b Mon Sep 17 00:00:00 2001 From: Liam Date: Sun, 20 Oct 2024 13:59:48 +0100 Subject: [PATCH] fix country flag sizing --- projects/website/src/components/country-flag.tsx | 4 ++-- projects/website/src/components/tooltip.tsx | 11 +++++++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/projects/website/src/components/country-flag.tsx b/projects/website/src/components/country-flag.tsx index 6b538a2..494ed6b 100644 --- a/projects/website/src/components/country-flag.tsx +++ b/projects/website/src/components/country-flag.tsx @@ -8,13 +8,13 @@ type Props = { export default function CountryFlag({ code, size = 24 }: Props) { return ( - {normalizedRegionName(code)}

} asChild={false}> + {normalizedRegionName(code)}

} className={`w-[${size * 2}px] min-w-[${size * 2}px]`}> {/* eslint-disable-next-line @next/next/no-img-element */} Player Country
); diff --git a/projects/website/src/components/tooltip.tsx b/projects/website/src/components/tooltip.tsx index 60f3da9..5e0bd30 100644 --- a/projects/website/src/components/tooltip.tsx +++ b/projects/website/src/components/tooltip.tsx @@ -16,16 +16,23 @@ type Props = { */ asChild?: boolean; + /** + * The additional class names + */ + className?: string; + /** * Where the tooltip will be displayed */ side?: "top" | "bottom" | "left" | "right"; }; -export default function Tooltip({ children, display, asChild = true, side = "top" }: Props) { +export default function Tooltip({ children, display, asChild = true, side = "top", className }: Props) { return ( - {children} + + {children} + {display} );