feat: dark mode

This commit is contained in:
shinya
2025-06-26 21:00:11 +08:00
parent 3652bf3e6b
commit d677ca9877
23 changed files with 234 additions and 78 deletions

View File

@@ -15,7 +15,7 @@ const CapsuleSwitch: React.FC<CapsuleSwitchProps> = ({
}) => {
return (
<div
className={`inline-flex bg-gray-300/80 rounded-full p-1 ${
className={`inline-flex bg-gray-300/80 rounded-full p-1 dark:bg-gray-700 ${
className || ''
}`}
>
@@ -25,8 +25,8 @@ const CapsuleSwitch: React.FC<CapsuleSwitchProps> = ({
onClick={() => onChange(opt.value)}
className={`w-16 px-3 py-1 text-xs sm:w-20 sm:py-2 sm:text-sm rounded-full font-medium transition-all duration-200 ${
active === opt.value
? 'bg-white text-gray-900 shadow-sm'
: 'text-gray-700 hover:text-gray-900'
? 'bg-white text-gray-900 shadow-sm dark:bg-gray-500 dark:text-gray-100'
: 'text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-100'
}`}
>
{opt.label}