File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed
src/components/Nav/Desktop Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,14 @@ const DesktopNavMenu = ({ toggleColorMode }: DesktopNavMenuProps) => {
35
35
"Switch to Light Theme"
36
36
)
37
37
38
+ const desktopHoverFocusStyles = {
39
+ '& > svg' : {
40
+ transform : "rotate(10deg)" ,
41
+ color : "primary.hover" ,
42
+ transition : "transform 0.5s, color 0.2s"
43
+ }
44
+ }
45
+
38
46
/**
39
47
* Adds a keydown event listener to toggle color mode (ctrl|cmd + \)
40
48
* or open the language picker (\).
@@ -54,16 +62,13 @@ const DesktopNavMenu = ({ toggleColorMode }: DesktopNavMenuProps) => {
54
62
return (
55
63
< HStack hideBelow = "md" gap = "0" >
56
64
< IconButton
57
- transition = "transform 0.5s, color 0.2s"
58
65
icon = { ThemeIcon }
59
66
aria-label = { themeIconAriaLabel }
60
67
variant = "ghost"
61
68
isSecondary
62
69
px = { { base : "2" , xl : "3" } }
63
- _hover = { {
64
- transform : "rotate(10deg)" ,
65
- color : "primary.hover" ,
66
- } }
70
+ _hover = { desktopHoverFocusStyles }
71
+ _focus = { desktopHoverFocusStyles }
67
72
onClick = { toggleColorMode }
68
73
/>
69
74
You can’t perform that action at this time.
0 commit comments