1.0.7 • Published 3 years ago

q2a_clap_button v1.0.7

Weekly downloads
5
License
-
Repository
-
Last release
3 years ago

Farmers Market Finder Demo Farmers Market Finder Demo Farmers Market Finder Demo

Install

$ yarn add q2a_clap_button 

Usage

import React from 'react';
import ClapButton from 'q2a_clap_button';
import ThumbUpIcon from '@material-ui/icons/ThumbUp';
import FavoriteIcon from '@material-ui/icons/Favorite';


  <ClapButton
    iconComponent={<FavoriteIcon style={{ width: '20px', height: '20px', fill: 'white' }} />}
    currentClapCount={1000}
    userClapCount={0}
    step={1}
    maxClapCount={10}
    // clapCircleSize={'medium'}
    // countCircleSize={'medium'}
    // clapCircleColor={'#5f27ae'}
    // countCircleColor={'#5b28ae'}
    radius={100}
    style={{
      marginTop: '300px',
    }}
  />

Props and Options

PropsValue
iconComponentCustom component for clap icon
currentClapCountInitial value for clap counts
userClapCountHow many times user clapped
stepClap count increase on each click
maxClapCountUpper-bound for userClapsCount
clapCircleSize'large' or 'medium' or 'small'
countCircleSize'large' or 'medium' or 'small'
clapCircleColorcolor of clap circle
countCircleColorcolor of count circle
radiusradius of animation

License

MIT