react-thanos-glove
    TypeScript icon, indicating that this package has built-in type declarations

    0.0.7 • Public • Published

    React Thanos Glove

    Infinity gauntlet button for react

    npm Build Status min minzip

    tanos snap tanos time

    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

    Install

    npm i react-thanos-glove

    DownloadsWeekly Downloads

    1

    Version

    0.0.7

    License

    MIT

    Unpacked Size

    13 kB

    Total Files

    7

    Last publish

    Collaborators

    • jiggum