import React , { useState } from "react" ; import Keyevent from "react-keyevent" ; const TopSide = ( ) => { const [ count , setCount ] = useState ( 0 ) ; const onAltT = ( ) => { setCount ( count + 1 ) ; } ; return ( < Keyevent className = "TopSide" events = { { onAltT , } } needFocusing > < span className = "tip" > Click To Focusing < /span> < div className = "group" > < span className = "key" > Alt < /span> < span className = "key" > T < /span> < span className = "count" > { count } < /span> < /div> < /Keyevent>); } ; export default TopSide ;