Delete client/src/components/test_animate.js

This commit is contained in:
Chigozirim Igweamaka 2024-08-04 23:52:07 +01:00 committed by GitHub
parent f0b798871b
commit 8affd31305
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,31 +0,0 @@
import React, { useState } from "react";
import AnimatedNumber from "./AnimatedNumber";
import { Bounce } from "react-toastify";
const TestComponent = (props) => {
const [number, setNumber] = useState(18);
const increment = () => setNumber((prev) => prev + 1);
const decrement = () => setNumber((prev) => prev - 1);
return (
<div>
<h1>Animated Number</h1>
<AnimatedNumber
animateToNumber={number}
fontStyle={{ fontSize: "2rem", color: "black" }}
// transitions={(index) => ({
// duration: 10,
// delay: index * 10,
// })}
includeComma={true}
/>
<div>
<button onClick={increment}>Increment</button>
<button onClick={decrement}>Decrement</button>
</div>
</div>
);
};
export default TestComponent;