npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-fundraising-countdown

v0.0.17

Published

ICO Fundraising component includes: countdown, progressbar, and milestones

Downloads

35

Readme

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

| Name | Type | Default | Desc | | ----------------------- | :------------------: | :-------------------------------: | ------------------------------------------------------------------- | | icoProgress | bool | false | show progress when the time is up | | campaignEndDate | string (date format) | 10 seconds from current date-time | | currentFund | number | 0 | the current fund your raised do far | | softcap | number | 0 | the soft cap you need to achieve to start your project | | hardcap | number | the maximum cap needed | | milestones | array of object | [] | takes an object of two attributes (text, cap) see the example above | | progressColor | string | primary | color of the progress bar | | milestoneLineColor | string | grey | color to represent the line and milestone text | | icoClockStyle | object | {backgroundColor:'#000' | Clock Unit container Style | | icoClockFlipStyle | object | {backgroundColor:'#000'} | the folding Clock container style | | icoClockFlipTextStyle | string (color) | {color:'#fff'} | the clock digit text style of each unit | | unitLabelContainerStyle | string (color) | {backgroundColor:'#000'} | the Unit label Container Style | | unitLabelTextStyle | string (color) | {color:'#fff'} | the Unit label Text Style |