Merge pull request #950 from cxf213/patch-1

Fix button alignment in ThemeSwitch component
This commit is contained in:
Timothy 2024-07-10 21:36:34 +08:00 committed by GitHub
commit 405742b04f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -54,9 +54,9 @@ const ThemeSwitch = () => {
useEffect(() => setMounted(true), [])
return (
<div className="mr-5">
<div className="mr-5 flex items-center">
<Menu as="div" className="relative inline-block text-left">
<div className="hover:text-primary-500 dark:hover:text-primary-400">
<div className="flex items-center justify-center hover:text-primary-500 dark:hover:text-primary-400">
<Menu.Button>
{mounted ? resolvedTheme === 'dark' ? <Moon /> : <Sun /> : <Blank />}
</Menu.Button>