From 1df3102644aecb8c12dd7a146e1a0932aef640b7 Mon Sep 17 00:00:00 2001 From: francesco Date: Fri, 6 Dec 2024 02:41:30 +0100 Subject: [PATCH] Removed dark hover on buttons --- .../example_next/src/app/(website)/components/HeaderLink.tsx | 2 +- examples/example_next/tailwind.config.js | 1 - .../src/app/(website)/components/HeaderLink.tsx | 2 +- packages/cli/templates/template_next_pro/tailwind.config.js | 1 - packages/firecms_cloud/src/hooks/useBuildProjectConfig.tsx | 2 -- packages/ui/README.md | 1 - packages/ui/src/components/Button.tsx | 4 ++-- packages/ui/src/components/Slider.tsx | 2 +- packages/ui/tailwind.config.js | 1 - packages/user_management/tailwind.config.js | 1 - website/docs/components.mdx | 1 - website/docs/pro/migrating_from_v3_beta.mdx | 1 - website/docs/pro/nextjs.mdx | 1 - website/docs/pro/styling_firecms.mdx | 2 -- website/tailwind.config.js | 1 - 15 files changed, 5 insertions(+), 18 deletions(-) diff --git a/examples/example_next/src/app/(website)/components/HeaderLink.tsx b/examples/example_next/src/app/(website)/components/HeaderLink.tsx index 49c5e5299..1ea5c6ffc 100644 --- a/examples/example_next/src/app/(website)/components/HeaderLink.tsx +++ b/examples/example_next/src/app/(website)/components/HeaderLink.tsx @@ -15,7 +15,7 @@ export function HeaderLink({ href, children, className }: HeaderLinkProps) { const isActive = pathname.startsWith(href); return ( {children} diff --git a/examples/example_next/tailwind.config.js b/examples/example_next/tailwind.config.js index 75fc3bada..19563e706 100644 --- a/examples/example_next/tailwind.config.js +++ b/examples/example_next/tailwind.config.js @@ -43,7 +43,6 @@ export default { }, colors: { primary: "var(--fcms-primary)", - "primary-dark": "var(--fcms-primary-dark)", "primary-bg": "var(--fcms-primary-bg)", secondary: "var(--fcms-secondary)", field: { diff --git a/packages/cli/templates/template_next_pro/src/app/(website)/components/HeaderLink.tsx b/packages/cli/templates/template_next_pro/src/app/(website)/components/HeaderLink.tsx index 49c5e5299..1ea5c6ffc 100644 --- a/packages/cli/templates/template_next_pro/src/app/(website)/components/HeaderLink.tsx +++ b/packages/cli/templates/template_next_pro/src/app/(website)/components/HeaderLink.tsx @@ -15,7 +15,7 @@ export function HeaderLink({ href, children, className }: HeaderLinkProps) { const isActive = pathname.startsWith(href); return ( {children} diff --git a/packages/cli/templates/template_next_pro/tailwind.config.js b/packages/cli/templates/template_next_pro/tailwind.config.js index 12343d675..dddf441bf 100644 --- a/packages/cli/templates/template_next_pro/tailwind.config.js +++ b/packages/cli/templates/template_next_pro/tailwind.config.js @@ -43,7 +43,6 @@ export default { }, colors: { primary: "var(--fcms-primary)", - "primary-dark": "var(--fcms-primary-dark)", "primary-bg": "var(--fcms-primary-bg)", secondary: "var(--fcms-secondary)", field: { diff --git a/packages/firecms_cloud/src/hooks/useBuildProjectConfig.tsx b/packages/firecms_cloud/src/hooks/useBuildProjectConfig.tsx index 21645564e..d2dcba05e 100644 --- a/packages/firecms_cloud/src/hooks/useBuildProjectConfig.tsx +++ b/packages/firecms_cloud/src/hooks/useBuildProjectConfig.tsx @@ -118,11 +118,9 @@ export function useBuildProjectConfig({ useEffect(() => { if (primaryColor) { document.documentElement.style.setProperty("--fcms-primary", primaryColor); - document.documentElement.style.setProperty("--fcms-primary-dark", darkenColor(primaryColor, 10)); document.documentElement.style.setProperty("--fcms-primary-bg", hexToRgbaWithOpacity(primaryColor, 10)); } else { document.documentElement.style.setProperty("--fcms-primary", darkenColor(DEFAULT_PRIMARY_COLOR, 10)); - document.documentElement.style.setProperty("--fcms-primary-dark", darkenColor(DEFAULT_PRIMARY_COLOR, 10)); document.documentElement.style.setProperty("--fcms-primary-bg", hexToRgbaWithOpacity(DEFAULT_PRIMARY_COLOR, 10)); } if (secondaryColor) { diff --git a/packages/ui/README.md b/packages/ui/README.md index 63814f2a1..d069cb5cc 100644 --- a/packages/ui/README.md +++ b/packages/ui/README.md @@ -75,7 +75,6 @@ Finally, you need to define your primary and secondary colors in your `index.css :root { --fcms-primary: #0070F4; - --fcms-primary-dark: #0061e6; --fcms-primary-bg: #0061e610; --fcms-secondary: #FF5B79; } diff --git a/packages/ui/src/components/Button.tsx b/packages/ui/src/components/Button.tsx index b33c4a38c..9f8946f77 100644 --- a/packages/ui/src/components/Button.tsx +++ b/packages/ui/src/components/Button.tsx @@ -38,8 +38,8 @@ const ButtonInner = React.forwardRef< "w-fit": !fullWidth, // Filled Variants - "border border-primary bg-primary hover:bg-primary-dark focus:ring-primary shadow hover:ring-1 hover:ring-primary text-white hover:text-white": variant === "filled" && color === "primary" && !disabled, - "border border-secondary bg-secondary hover:bg-secondary-dark focus:ring-secondary shadow hover:ring-1 hover:ring-secondary text-white hover:text-white": variant === "filled" && color === "secondary" && !disabled, + "border border-primary bg-primary focus:ring-primary shadow hover:ring-1 hover:ring-primary text-white hover:text-white": variant === "filled" && color === "primary" && !disabled, + "border border-secondary bg-secondary focus:ring-secondary shadow hover:ring-1 hover:ring-secondary text-white hover:text-white": variant === "filled" && color === "secondary" && !disabled, "border border-red-500 bg-red-500 hover:bg-red-500 focus:ring-red-500 shadow hover:ring-1 hover:ring-red-600 text-white hover:text-white": variant === "filled" && color === "error" && !disabled, "border border-surface-accent-200 bg-surface-accent-200 hover:bg-surface-accent-300 focus:ring-surface-accent-400 shadow hover:ring-1 hover:ring-surface-accent-400 text-text-primary hover:text-text-primary dark:text-text-primary-dark hover:dark:text-text-primary-dark": variant === "filled" && color === "text" && !disabled, diff --git a/packages/ui/src/components/Slider.tsx b/packages/ui/src/components/Slider.tsx index 4c5700f57..3018d3e90 100644 --- a/packages/ui/src/components/Slider.tsx +++ b/packages/ui/src/components/Slider.tsx @@ -33,7 +33,7 @@ function SliderThumb(props: {