From 3399a22223549f0ae1ba7d2408014460807a2161 Mon Sep 17 00:00:00 2001 From: Chase Fleming Date: Tue, 17 Dec 2024 16:28:07 -0800 Subject: [PATCH] Fix button/dropdown dark mode issues (#1056) * Button to white * Fix variants * Remove --------- Co-authored-by: Chase Fleming <1666730+chasefleming@users.noreply.github.com> --- .../src/lib/Components/Dropdown/index.tsx | 24 ++++++++++++------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/src/ui/design-system/src/lib/Components/Dropdown/index.tsx b/src/ui/design-system/src/lib/Components/Dropdown/index.tsx index 2cb9a30490..ef331bb326 100644 --- a/src/ui/design-system/src/lib/Components/Dropdown/index.tsx +++ b/src/ui/design-system/src/lib/Components/Dropdown/index.tsx @@ -4,9 +4,17 @@ import clsx from 'clsx'; const BASE_CLASSES = 'inline-flex items-center justify-center font-semibold text-center border transition duration-200 cursor-pointer'; -const VARIANT_CLASSES = 'bg-black text-white hover:bg-gray-800 active:bg-gray-900'; -const MENU_CLASSES = - 'text-white bg-black border border-gray-700 hover:bg-gray-800 active:bg-gray-900 transition duration-200'; + +const VARIANTS = { + black: ` + bg-black text-white border-transparent hover:bg-gray-800 active:bg-gray-900 + dark:bg-white dark:text-black dark:hover:bg-gray-200 dark:active:bg-gray-300 + `, + menu: ` + bg-black text-white border border-gray-700 shadow-lg hover:bg-gray-800 + dark:bg-white dark:text-black dark:border-gray-300 dark:hover:bg-gray-200 + `, +}; export interface DropdownItem { label: string; @@ -23,7 +31,7 @@ const Dropdown: React.FC = ({ buttonLabel, items }) => { {/* Button */} {buttonLabel} @@ -32,7 +40,6 @@ const Dropdown: React.FC = ({ buttonLabel, items }) => { {items.map((item, index) => ( @@ -40,9 +47,10 @@ const Dropdown: React.FC = ({ buttonLabel, items }) => {