0.0.2 • Published 9 months ago
@acrool/react-jackpot v0.0.2
Acrool React Jackpot
Features
- Support custom length
Install
yarn add @acrool/react-jackpotUsage
add in your index.tsx
import "@acrool/react-jackpot/dist/index.css";then in your page
import {Flex, fr, Grid} from '@acrool/react-grid';
import styled from 'styled-components';
import {Jackpot} from '@acrool/react-jackpot';
import {generatorArray} from '@acrool/js-utils/array';
import {useRef} from "react";
const Example = () => {
const [amount, setAmount] = useState(32767);
const timeRef = useRef<Node.Timer>(null);
useEffect(() => {
timeRef = setInterval(() => {
onChange(getRandom(1000));
}, 3000);
return () => {
clearInterval(timeRef.current);
};
}, []);
return (
<Jackpot length={7} amount={amount}/>
);
export default Example;There is also a example that you can play with it:
License
0.0.2
9 months ago
0.0.2-alpha.1
1 year ago
0.0.2-alpha.4
1 year ago
0.0.2-alpha.3
1 year ago
0.0.2-alpha.5
1 year ago
0.0.1
1 year ago