Fix button alignment in ThemeSwitch component

This commit is contained in:
MisakiAkeno 2024-07-01 13:42:10 +08:00 committed by GitHub
parent a2fde6dc7e
commit acc04280ee
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="flex items-center mr-5">
<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>