parent
1a8870367c
commit
fee18caabf
4 changed files with 49 additions and 4 deletions
@ -0,0 +1,27 @@ |
|||||||
|
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 ${ |
||||||
|
isHovering ? "" : "hidden" |
||||||
|
}`}
|
||||||
|
> |
||||||
|
hover to see me |
||||||
|
</button> |
||||||
|
<img |
||||||
|
src={blogImage} |
||||||
|
alt="" |
||||||
|
className="w-96" |
||||||
|
onMouseEnter={() => setIsHovering(true)} |
||||||
|
onMouseLeave={() => setIsHovering(false)} |
||||||
|
/> |
||||||
|
</div> |
||||||
|
); |
||||||
|
}; |
||||||
|
|
||||||
|
export default Testttt; |
Loading…
Reference in new issue