1.4.0 • Published 5 years ago

react-thanos-grove v1.4.0

Weekly downloads
2
License
ISC
Repository
github
Last release
5 years ago

react-thanos-grove

Build Status codecov NPM version

npm.io

Make the naping animation in Google Thanos Easter Egg as react component.

Please refer the example here for more information.

Installation

npm i react-thanos-grove

Components

  • ThanosGrove

    Snap animation by thanos's grove

    propstyperequireddefaultdescription
    classNamestringfalse-Custom class name of the wrap component
    onDecimationfunctionfalse-callback function which run with decimate
    onReversefunctionfalse-callback function which run with reverse

Way to Ride

  • Common jS
// import from package entry point
const uc = require('react-thanos-grove')
require('react-thanos-grove/css/style.css')

  <uc.ThanosGrove {...props} />
// only import specific component
const ThanosGrove = require('react-thanos-grove/lib/components/ThanosGrove')
require('react-thanos-grove/css/components/ThanosGrove/style.css')

  <ThanosGrove {...props} />
  • ESM
// import from package entry point
import { ThanosGrove } from 'react-thanos-grove'
import 'react-thanos-grove/css/style.css'

  <ThanosGrove {...props} />
// only import specific component
import ThanosGrove from 'react-thanos-grove/es/components/ThanosGrove'
import 'react-thanos-grove/css/components/ThanosGrove/style.css'

  <ThanosGrove {...props} />

Development by storybook

npm install
npm start storybook
  • configuration files list in .storybook directory
  • story files list in .stories directory

Test

npm run test
  • __tests__
    • unit test running by jest
    • use test:update to update jest snapshot