react-wheel-fortune
TypeScript icon, indicating that this package has built-in type declarations

1.0.6 • Public • Published

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
Properties default value Optional
items NA No
size 200 Yes
fontSize 10 Yes
spacing 50 Yes
color '#da3768' Yes
wheelTurn 5 Yes
duration 5 Yes
timeReset 0.25 Yes
borderSize 5 Yes
result RANDOM Yes
disable false Yes
onFinished N/A Yes
onStart N/A Yes

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

Package Sidebar

Install

npm i react-wheel-fortune

Weekly Downloads

3

Version

1.0.6

License

MIT

Unpacked Size

35.1 kB

Total Files

14

Last publish

Collaborators

  • besoft