0.0.17 • Published 6 years ago

react-fundraising-countdown v0.0.17

Weekly downloads
5
License
MIT
Repository
github
Last release
6 years ago

React component (react-fundraising-countdown)

This is a simple package that can be used for two purposes:

  • 1- Used for Countdown only (FlipCard countdown) day: hours: minutes: seconds
  • 2- fundraising campaign countdown, milestones, and progress bar to display the fund achieved progress compare to the minimum and maximum Fund target.

Click here to check it out

inspired by React Flip Clock , A Pen by Libor Gabrhel

Getting Started

You can install via npm or yarn:

  • npm install react-fundraising-countdown -S
  • yarn add react-fundraising-countdown

Live Demo

Motivation

The idea started when building a small website for an ICO campaign. So I thought of separating this fundraising countdown, fund progress, and milestones of a series of steps within the campaign from the main package so it can be reusable and serves as a starting point for further enhancement by developers to make it great and more useful.

Usage

const milestonesData= [{
  text: 'Campaign Start',
  cap: 0
},{
  text: 'Minimum Goal $15M',
  cap: 15000000
},{
  text: 'Maximum Goal $24M',
  cap: 24000000
},];

  <h1>Just Countdown without progress bar or Milstones</h1>
  <FundClockProgress campaignEndDate={'2020-10-14'} />

  <h1>With Milestones & Progress bar for Crowdsale</h1>
  <FundClockProgress
    icoProgress
    currentFund={this.state.currentFund}
    softcap={15000000}
    hardcap={30000000}
    milestones={milestonesData}
    milestoneLineColor={'#a44fd2'}
    progressColor={'warning'} //bootstrap default colors: 'warning', 'info', 'success', ...etc .. please refer to bootstrap colors names
    icoClockStyle={{backgroundColor:'#ddd'}}
    icoClockFlipStyle={{backgroundColor:'#ddd'}}
    icoClockFlipTextStyle={{color:'#e91e63'}}
    unitLabelContainerStyle={{backgroundColor:'#e91e63'}}
    // unitLabelTextStyle={{color:'#000', fontSize: '1.1em'}}
  />

Live Demo

Props

NameTypeDefaultDesc
icoProgressboolfalseshow progress when the time is up
campaignEndDatestring (date format)10 seconds from current date-time
currentFundnumber0the current fund your raised do far
softcapnumber0the soft cap you need to achieve to start your project
hardcapnumberthe maximum cap needed
milestonesarray of object[]takes an object of two attributes (text, cap) see the example above
progressColorstringprimarycolor of the progress bar
milestoneLineColorstringgreycolor to represent the line and milestone text
icoClockStyleobject{backgroundColor:'#000'Clock Unit container Style
icoClockFlipStyleobject{backgroundColor:'#000'}the folding Clock container style
icoClockFlipTextStylestring (color){color:'#fff'}the clock digit text style of each unit
unitLabelContainerStylestring (color){backgroundColor:'#000'}the Unit label Container Style
unitLabelTextStylestring (color){color:'#fff'}the Unit label Text Style
0.0.17

6 years ago

0.0.16

6 years ago

0.0.15

6 years ago

0.0.14

6 years ago

0.0.13

6 years ago

0.0.12

6 years ago

0.0.11

6 years ago

0.0.10

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago

0.1.3

6 years ago