This commit is contained in:
client perkafean
2024-09-27 09:07:57 +00:00
parent faee9dfd2d
commit 69b3fe4347
33 changed files with 824 additions and 204 deletions

View File

@@ -0,0 +1,24 @@
import React, { useState } from "react";
import "./ButtonWithReplica.css";
const ButtonWithReplica = ({ children }) => {
const [isActive, setIsActive] = useState(false);
const handleClick = () => {
setIsActive(true);
setTimeout(() => {
setIsActive(false);
}, 1000); // Duration of the animation
};
return (
<div className="container">
<button className="button" onClick={handleClick}>
{children}
</button>
<div className={`replica ${isActive ? "active" : ""}`}></div>
</div>
);
};
export default ButtonWithReplica;