@acrool/react-jackpot
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

Acrool React Jackpot

Acrool React Jackpot Logo

Fast custom jackpot for Reactjs

NPM npm npm

npm downloads npm

Features

  • Support custom length

Install

yarn add @acrool/react-jackpot

Usage

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:

Play react-editext-example

License

MIT © Acrool & Imagine

Package Sidebar

Install

npm i @acrool/react-jackpot

Weekly Downloads

8

Version

0.0.1

License

MIT

Unpacked Size

94.9 kB

Total Files

8

Last publish

Collaborators

  • imagine10255