0.0.7 • Published 3 years ago
react-thanos-glove v0.0.7
React Thanos Glove
Infinity gauntlet button for react
Installation
yarn:
yarn add react-thanos-glove
npm:
npm install --save react-thanos-glove
Usage
import ThanosGlove from 'react-thanos-glove'
...
<ThanosGlove onClick={handleClick} />
<ThanosGlove size={100} type="time" onAnimationEnd={handleAnimationEnd} mute />
...
Props
size: (optional, number, default:80)
- Button's height and width. (px)
duration: (optional, number, default: 2000)
- Anmation's duration. (ms)
type: (optional, 'snap' | 'time', default: 'snap')
- Button's type
mute: (optional, boolean, default: false)
- Whether mute the action sound
onClick: (optional, (e: MouseEvent) => void)
- Glove onClick handler
onAnimationEnd: (optional, (e: AnimationEvent) => void)
If you want to change type of the glove, use this api rather than onClick
- Triggered when glove animation is ended