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.
28 lines
661 B
28 lines
661 B
3 years ago
|
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;
|