You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
685 B
27 lines
685 B
import React, { useState } from "react"; |
|
import blogImage from "../../assets/images/blog-featured-image.jpg"; |
|
|
|
const Testttt = () => { |
|
const [isHovering, setIsHovering] = useState(false); |
|
|
|
return ( |
|
<div className="p-20 relative"> |
|
<button |
|
className={`bg-red-400 p-4 rounded absolute top-0 right-10 cursor-pointer transition delay-500 ${ |
|
isHovering ? "" : "hidden" |
|
}`} |
|
> |
|
hover to see me |
|
</button> |
|
<img |
|
src={blogImage} |
|
alt="" |
|
className="w-96" |
|
onMouseEnter={() => setIsHovering(true)} |
|
onMouseLeave={() => setIsHovering(false)} |
|
/> |
|
</div> |
|
); |
|
}; |
|
|
|
export default Testttt;
|
|
|