npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-roulette-game-asim-2

v1.1.1

Published

let you use roulette game in your react project

Downloads

1

Readme

React Roulette Game

React Roulette Game is a plugin for whom want to have roulette game in project DEMO

How to install

  1. go to your terminal and type the following:
yarn add react-roulette-game-asim

How to use:

import Roulette from 'react-roulette-game-asim'

const DemoComp = () => (
  <div className='game-box'>  //  STEP1. draw the width of your roulette and adjust its position
    <Roulette {...roulette_props} /> //  STEP2. add Roulette component and give the props you want
  </div>
)

const roulette_props = {
  roulette_img_under_highlight,
  roulette_img_on_highlight,
  highlight_img,
  pointer_img,
  prize_arr: [
    'Baseball',
    'Rugby',
    'Tennis',
    'Soccer',
    'Badminton',
    'Basketball',
  ],
}

import highlight_img from './images/hightlight.png'
import pointer_img from './images/pointer.png'
import roulette_img_under_highlight from './images/rou_under_high.png'
import roulette_img_on_highlight from './images/rou_on_high.png'

Common Props

highlight_img

type: string
default: ''
usage: when roulette rotate over, hightlight will bling bling, its purpose is to highlight the winning-prize;
HIGHLY RECOMMENDED: the ratio of this image should be square

roulette_img_under_highlight

type: string
default: ''
usage: roulette's body image, its zIndex is smaller than highlight;
HIGHLY RECOMMENDED: the ratio of this image should be square

roulette_img_on_highlight

type: string
default: ''
usage: roulette's body image, its zIndex is bigger than highlight;
HIGHLY RECOMMENDED: the ratio of this image should be square

PS1: you can put your roulette's body image on one of them or both; just due to different design, something will be under the highlight and something will be on the highlight, so let you have more option to combine your roulette

PS2: your roulette should put like this: alt text not like this: alt text

pointer_img

type: string
default: ''
usage: roulette's pointer, to point the winning-prize;
HIGHLY RECOMMENDED: the ratio of this image should be square

PS: the prize you win always on top, like this:alt text, so your pointer should always poit toward that one

prize_arr

type: array
required
usage: how many prize in your roulette, then there should be how many prize-name in this array; the order is counter-clockwise to your roulette

start_text

type: string
default: Start
usage: text in start button

reset_text

type: string
default: Reset
usage: text in reset button

Advanced Props

has_reset

type: boolean
default: true
usage: if true, there will be reset button

reset_callback

type: function
default: () => {}
parameter: none
usage: when you click reset button, reset_callback will be triggered

start_callback

type: function
default: () => {}
parameter: none
usage: when you click start button, start_callback will be triggered

on_complete

type: function
default: () => {}
parameter: (prize) => {}
usage: it will be triggered when roulette rotate over, and it will return a winning-prize at this round

Thank You for Your Use

It's welcome to report me any issue or bug, thanks a lot!

Author

WreewanMorhee