🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

react-wheel-fortune

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-wheel-fortune

Made with create-react-library

1.0.6
latest
Source
npm
Version published
Weekly downloads
7
16.67%
Maintainers
1
Weekly downloads
 
Created
Source

react-wheel-fortune

React Wheel Fortune

NPM JavaScript Style Guide

Install

npm install --save react-wheel-fortune
npm install --save react-wheel-fortune --legacy-peer-deps
yarn add react-wheel-fortune
Propertiesdefault valueOptional
itemsNANo
size200Yes
fontSize10Yes
spacing50Yes
color'#da3768'Yes
wheelTurn5Yes
duration5Yes
timeReset0.25Yes
borderSize5Yes
resultRANDOMYes
disablefalseYes
onFinishedN/AYes
onStartN/AYes

Usage

import React from 'react'

import { BasicWheel } from 'react-wheel-fortune'
import 'react-wheel-fortune/dist/index.css'

const App = () => {
  let items: any[] = [
    <p>BESOFT
      <img
        height={20}
        src='***.png' />
    </p>,
    "WIN1",
    "LOST",
    "HELLO"]
  let wheelColor: string = "#000"
  return <BasicWheel
    items={items}
    color={wheelColor}
    result={3} // index of value in array (if not set it random result)
    textColor='#fff'
  />
}

export default App

DEMO

before spinning

"Buy Me A Coffee"

License

MIT © besoftvn

Keywords

wheel

FAQs

Package last updated on 11 Oct 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts