From f726091d053504fe8b1721be419afe9a2fa5255c Mon Sep 17 00:00:00 2001 From: KaiyiWing Date: Sun, 15 Oct 2023 10:54:00 +0800 Subject: [PATCH] fix: dark theme issue --- src/index.css | 10 +++++----- src/pages/Typing/components/StartButton/index.tsx | 14 +++++++++----- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/src/index.css b/src/index.css index bbf6d9bdc1..d9fc852d89 100644 --- a/src/index.css +++ b/src/index.css @@ -108,25 +108,25 @@ body, } .listbox-button { - @apply relative w-40 cursor-pointer rounded-lg bg-white py-2 pl-3 pr-10 text-left shadow-md focus:outline-none; + @apply relative w-40 cursor-pointer rounded-lg bg-white py-2 pl-3 pr-10 text-left shadow-md focus:outline-none dark:bg-gray-600; } .listbox-button span:nth-of-type(1) { - @apply block truncate text-gray-900; + @apply block truncate text-gray-900 dark:text-white dark:text-opacity-60; } .listbox-button span:nth-of-type(2) { @apply pointer-events-none absolute inset-y-0 right-0 flex items-center pr-2 focus:outline-none; } .listbox-options { - @apply absolute mt-1 max-h-60 w-full overflow-auto rounded-md bg-white py-1 text-base shadow-lg focus:outline-none; + @apply absolute mt-1 max-h-60 w-full overflow-auto rounded-md bg-white py-1 text-base shadow-lg focus:outline-none dark:bg-gray-600; } .listbox-options > li { - @apply relative cursor-pointer select-none py-2 pl-10 pr-4 text-gray-900 ui-active:bg-indigo-100 ui-active:text-indigo-900; + @apply relative cursor-pointer select-none py-2 pl-10 pr-4 text-gray-900 ui-active:bg-indigo-100 ui-active:text-indigo-900 dark:text-white dark:text-opacity-60 dark:ui-active:bg-gray-500 dark:ui-active:text-indigo-300; } .listbox-options > li > span:first-child { @apply block truncate font-normal ui-selected:font-medium; } .listbox-options-icon { - @apply absolute inset-y-0 left-0 flex items-center pl-3 text-indigo-600; + @apply absolute inset-y-0 left-0 flex items-center pl-3 text-indigo-600 dark:text-indigo-400; } .slider { diff --git a/src/pages/Typing/components/StartButton/index.tsx b/src/pages/Typing/components/StartButton/index.tsx index 489d15cf42..d35e0c2dd1 100644 --- a/src/pages/Typing/components/StartButton/index.tsx +++ b/src/pages/Typing/components/StartButton/index.tsx @@ -36,12 +36,16 @@ export default function StartButton({ isLoading }: { isLoading: boolean }) {