1.0.6 • Published 7 months ago

react-wheel-fortune v1.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

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

1.0.6

7 months ago

1.0.5

7 months ago

1.0.4

7 months ago

1.0.3

7 months ago

1.0.2

7 months ago

1.0.1

7 months ago

1.0.0

7 months ago