From 1b9d6201904a2c11f614bae891968744f63c2375 Mon Sep 17 00:00:00 2001 From: Mehdi BHA Date: Thu, 24 Oct 2024 20:13:35 +0100 Subject: [PATCH] chore: clean themes page ui --- www/src/app/themes/preview.tsx | 8 -- www/src/app/themes/theme-customizer.tsx | 162 +++++++++++++----------- 2 files changed, 87 insertions(+), 83 deletions(-) diff --git a/www/src/app/themes/preview.tsx b/www/src/app/themes/preview.tsx index 81c8deea..ac110047 100644 --- a/www/src/app/themes/preview.tsx +++ b/www/src/app/themes/preview.tsx @@ -28,14 +28,6 @@ export const Preview = () => { Preview - - - -
diff --git a/www/src/app/themes/theme-customizer.tsx b/www/src/app/themes/theme-customizer.tsx index b4cfc22c..4ba37692 100644 --- a/www/src/app/themes/theme-customizer.tsx +++ b/www/src/app/themes/theme-customizer.tsx @@ -94,9 +94,9 @@ export const ThemeCustomizer = (
-

+ {/*

You can generate color scales using these base colors. -

+

*/}
{( [ @@ -156,18 +156,20 @@ export const ThemeCustomizer = ( handleColorConfigChange("lightness", value as number) } + size="lg" className="!w-full" /> handleColorConfigChange("saturation", value as number) @@ -178,14 +180,14 @@ export const ThemeCustomizer = (
-

+ {/*

There are 5 color scales in the color system. You can learn more about it{" "} here . -

+

*/}
{( [ @@ -203,74 +205,82 @@ export const ThemeCustomizer = (
+ + + + + + +
+
+
+ - -
- -
- +
- { - setPreview("borders"); - handleRadiusChange(value as number); - }} - /> + + { + setPreview("borders"); + handleRadiusChange(value as number); + }} + /> +
); @@ -408,16 +418,16 @@ const Section = ({ }) => { return (
-

+ {/*

{title} -

-
{children}
+ */} +
{children}
); }; const ColorScale = ({ label, value }: { label: string; value: BaseColor }) => { - const { currentTheme, mode } = useThemes(); + const { currentTheme, mode, isLoading } = useThemes(); const shades = currentTheme.colors[mode][value].shades; return (
@@ -428,12 +438,14 @@ const ColorScale = ({ label, value }: { label: string; value: BaseColor }) => { {shades.map((color, index) => (
  • - + + +
  • ))}