Coder Social home page Coder Social logo

maxicorrea / mx-progressbar Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 429 KB

Material UI v4 Progress Bar Component

HTML 14.06% TypeScript 73.68% CSS 12.26%
github-actions github-package-registry material-ui progress-bar progressbar react react-component react-component-library typescript

mx-progressbar's Introduction

mx-progressbar

Made with create-react-library

NPM JavaScript Style Guide

Install

npm install --save mx-progressbar

Usage

import * as React  from 'react'
import { ProgressBar } from '@maxicorrea/mx-progressbar'

const App = () => {
  const [progress, setProgress] = React.useState(0);
  const [time] = React.useState(1000);
  React.useEffect(() => {
     const timer = setInterval(() => {
        setProgress((prevProgress: number) => (prevProgress >= 100 ? 0 : prevProgress + 1));
     }, time);
     return () => {
        clearInterval(timer);
        setProgress(0);
     };
  }, [time]);
  return (
    <div style={{margin: "20px"}}>
      <ProgressBar progress={progress} width='500px'/>
    </div>
  )
}

export default App;

License

MIT © MaxiCorrea

mx-progressbar's People

Contributors

maxicorrea avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.