File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
documentation/src/refine-theme Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -29,9 +29,10 @@ export const LandingSweetSpot: FC<Props> = ({ className }) => {
2929 const activeListItem = list [ activeIndex ] ;
3030
3131 const [ shouldIncrement , setShouldIncrement ] = useState ( true ) ;
32+ const [ isHovering , setIsHovering ] = useState ( false ) ;
3233
3334 useEffect ( ( ) => {
34- if ( ! shouldIncrement ) {
35+ if ( ! shouldIncrement || isHovering ) {
3536 return ;
3637 }
3738
@@ -43,7 +44,7 @@ export const LandingSweetSpot: FC<Props> = ({ className }) => {
4344 }
4445
4546 return ( ) => clearInterval ( interval ) ;
46- } , [ shouldIncrement , inView ] ) ;
47+ } , [ shouldIncrement , inView , isHovering ] ) ;
4748
4849 return (
4950 < div ref = { ref } className = { clsx ( className , "w-full" ) } >
@@ -180,6 +181,13 @@ export const LandingSweetSpot: FC<Props> = ({ className }) => {
180181 setShouldIncrement ( false ) ;
181182 setActiveIndex ( index ) ;
182183 } }
184+ onMouseEnter = { ( ) => {
185+ setIsHovering ( true ) ;
186+ setActiveIndex ( index ) ;
187+ } }
188+ onMouseLeave = { ( ) => {
189+ setIsHovering ( false ) ;
190+ } }
183191 className = { clsx (
184192 "appearance-none" ,
185193 "focus:outline-none" ,
You can’t perform that action at this time.
0 commit comments