Komponent React React
const [hover, setHover] = useState(false)
const hoverStyle = {
//Styles
}
const normalStyle = {
//Styles
}
const onMouseEnter = () => {
setHover(true)
}
const onMouseLeave = () => {
setHover(false)
}
return (
<Component style={hover ? hoverStyle : normalStyle} onMouseEnter={onMouseEnter} onMouseLeave={onMouseLeave}> </Component>
)
PiterDev