From 6fcb58df49062ec1a2fdf3275acd3d44d145b61d Mon Sep 17 00:00:00 2001 From: Ajay Ghanwat Date: Sun, 17 Aug 2025 09:14:53 +0530 Subject: [PATCH] Updated Theme Switcher --- src/components/ColorSwitcher.astro | 8 +- src/components/ThemeSwitcher.astro | 459 +++++++++++------------------ src/pages/theme.astro | 7 +- 3 files changed, 177 insertions(+), 297 deletions(-) diff --git a/src/components/ColorSwitcher.astro b/src/components/ColorSwitcher.astro index 3c8c8fd..3296161 100644 --- a/src/components/ColorSwitcher.astro +++ b/src/components/ColorSwitcher.astro @@ -61,7 +61,7 @@ const item = aria-label={p.label} > - + - + {palettes[0].label} @@ -101,7 +101,7 @@ const item = aria-expanded="false" title="Brand color" > - + @@ -116,7 +116,7 @@ const item = > {palettes.map(p => ( - { - ui === "icons" && ( -
- - - -
- ) - } - - { - ui === "menu" && ( -
- - - -
- ) - } + + - +/* Check icon ONLY on active item */ +#{containerId} [role="menuitemradio"][aria-checked="true"] [data-check] { + opacity: 1 !important; + transform: scale(1) !important; +} + \ No newline at end of file diff --git a/src/pages/theme.astro b/src/pages/theme.astro index 0a6cc44..4a5bdeb 100644 --- a/src/pages/theme.astro +++ b/src/pages/theme.astro @@ -8,13 +8,12 @@ import Base from "../layouts/Base.astro";
+ +