GitXplorerGitXplorer
M

react-topbar-progress-indicator

public
109 stars
6 forks
2 issues

Commits

List of commits on branch master.
Verified
a3db3b6d538550856154f580f3cee3588d332dc2

updates lock & jest

MMoOx committed 2 years ago
Verified
b8c4fa6b1dff04c441fd6dbd950ce68b43522df4

Create FUNDING.yml

MMoOx committed 2 years ago
Verified
daad4844c3a9098a926b7b9c13c82fd5c9719e55

add Security contact information

MMoOx committed 2 years ago
Verified
023ace5058882879768d43eca3991b1555c5a5f8

Bump minimist from 1.2.5 to 1.2.6 (#29)

ddependabot[bot] committed 3 years ago
Verified
cd33f9fe10708da83db1a388c23e4708f0fdc6a5

bump node version to 16

MMoOx committed 3 years ago
Verified
de19ce35f8d0d33f29e0a336cfb0e26d463ace1d

4.1.1

MMoOx committed 3 years ago

README

The README file for this repository.

react-topbar-progress-indicator

Build Status Version

topbar progress indicator as a React component

Will simply show() and hide() topbar when the component is respectively mounted and unmounted.

Since topbar is a singleton, using <TopBarProgress /> multiples times will take this in consideration. This means that hide() will only be called when all <TopBarProgress /> have been unmounted.

For example, if you render 2 <TopBarProgress /> and unmount one (eg: you are doing 2 async things and only once is done), hide() won't be called. You will need to have both instances unmounted.

Installation

npm install react-topbar-progress-indicator
## or
yarn add react-topbar-progress-indicator

Usage

import TopBarProgress from "react-topbar-progress-indicator";

TopBarProgress.config({
  barColors: {
    "0": "#fff",
    "1.0": "#fff"
  },
  shadowBlur: 5
});

const YourThing = () => {
  return <div>{this.state.loading && <TopBarProgress />}</div>;
};

Config

Since topbar is a singleton, you should configure via Topbar.config().

barThickness (Integer, px)

The progress bar thickness in px (default: 3).

barColors (Object { progress: color })

Object of gradient color stops used to draw the progress bar.

Example:

  barColors: {
    "0": "#f00",
    "0.5": "#0f0",
    "1.0": "#00f",
  },

shadowBlur

Integer of the shadow blur in px (default: 10).

shadowColor

String that represent the shadow color (hexa, default: #000).


Changelog

Check the changelog for more informations about recent releases. You might also find releases notes on GitHub.

Contribute

⇄ Pull requests and ★ Stars are always welcome.

Please read the contribution guidelines before contributing.

Code of Conduct

We want the community to be friendly and respectful to each other. Please read our full code of conduct so that you can understand what actions will and will not be tolerated.

License

MIT

Security contact information

To report a security vulnerability, please use the Tidelift security contact. Tidelift will coordinate the fix and disclosure.