From 3c04102f9ad3b2119d91a695ca1dc241d34c9083 Mon Sep 17 00:00:00 2001 From: Nazar Poshtarenko <32395926+unrenamed@users.noreply.github.com> Date: Sat, 12 Oct 2024 11:49:39 +0300 Subject: [PATCH] fix(www): analytics bento code snippet is not readable (#2311) - add hover effect to analytics bento removing gradient background - make copy code button sticky to top-right corner - impl independent vertical scrolls for language switcher and code editor --- .../components/analytics/analytics-bento.tsx | 53 ++++++++++++++----- 1 file changed, 39 insertions(+), 14 deletions(-) diff --git a/apps/www/components/analytics/analytics-bento.tsx b/apps/www/components/analytics/analytics-bento.tsx index 65d9444c2d..ca06b96305 100644 --- a/apps/www/components/analytics/analytics-bento.tsx +++ b/apps/www/components/analytics/analytics-bento.tsx @@ -67,13 +67,22 @@ export function AnalyticsBento() { - -
+
{/* TODO: horizontal scroll */} - + {showApi ? : } - +
+
); @@ -189,24 +198,30 @@ function AnalyticsApiView() { exit={{ opacity: 0 }} transition={{ duration: 0.2, ease: "easeInOut" }} whileInView="visible" - className="w-full overflow-x-hidden" + className="w-full overflow-x-hidden relative" > -
+ +
-
+
-
@@ -223,7 +238,12 @@ function LanguageSwitcher({ setLanguage: React.Dispatch>; }) { return ( -
+
{languages.map(({ Icon, name }) => (