fix a bug in theme switcher related to events

i18n
mrshmllow 2 years ago committed by Michal
parent 9f5a8f59ff
commit 5934808041
No known key found for this signature in database
GPG Key ID: 52F8801FC912EB4F

@ -38,7 +38,7 @@ const IconThemeSwitcher = () => {
onBlur={() => {
requestAnimationFrame(() => {
if (!ref.current?.contains(document.activeElement)) {
setToggled(!toggled);
setToggled(false);
}
});
}}

@ -22,7 +22,7 @@ const NativeThemeSwitcher = () => {
{theme}
<FontAwesomeIcon icon={faAngleDown} size="sm" />
<select
onClick={(e) => {
onChange={(e) => {
setTheme(e.currentTarget.value);
}}
className="absolute inset-0 h-full w-full appearance-none opacity-0"

Loading…
Cancel
Save