1.47.0 • Published 4 years ago

react-material-ui-step-loader v1.47.0

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

react-material-ui-step-loader

npm_version license

Stepped Progress react component using material-ui

react-material-ui-step-loader preview



Overview

Installation

npm install react-material-ui-step-loader

Usage

import { StepLoader } from 'react-material-ui-step-loader';
const steps = [
  { label: 'Authenticating', labelAfter: 'Authenticated' },
  { label: 'Checking updates', labelAfter: 'Updated', labelError: 'No update found' },
  { label: 'Formatting message', labelAfter: 'Message formatted', labelSkip: 'Already formatted' },
  { label: 'Posting message', labelAfter: 'Message posted' },
  { label: 'Verifying', labelAfter: 'Verified' },
];
// ...

<StepLoader
  steps={steps}
  currentStep={2}
  currentProgress={75}
/>

Props API

StepLoader

Stepped LinearProgress component using material-ui

PropertyTypeRequiredDefault valueDescription
stepsarrayOfyesAn array of 'step' object with the following shape (label:string, labelAfter:string,labelSkip:string,labelError:string,color:string "primary"|"secondary").
currentStepnumberyesThe current step.
heightnumberno2The LinearProgress height.
colorenumnoThe color of the progress bars.
variantenumnoThe variant type for the LinearProgress outline. 'square' | 'rounded' | 'round'
currentProgressnumberno-1The current progress 0-100 of the current step. If ommited the LinearProgress will use the 'undeterminate' variant.
errorsarrayOfnoAn array of int representing the failed steps.
skipsarrayOfnoAn array of int representing the skipped steps.

Developers

Development

You should use YARN for development as NPM seems to be causing some issues! (Using NPM for just installing and using as a component is OK)

Demo app

  • yarn start for live-testing the demo app

Storybook

  • yarn storybook for live-testing the storybook app

GitHub Page

  • yarn github-page for testing a temporary build of the full github-page without an possible theme that you will choose later on GitHub (no live-testing)

Prod

Generate Readme.md

  • yarn generate-readme

Will generate a readme according to your package.json info and the following files :

    • setup_readme.md (if not present, it will use the default npm i YOUR_PACKAGE_NAME)
    • usage_readme.md
    • dev_readme.md

You can then edit your readme.md file if you need to before building/publishing/deploying

NPM

  • yarn publish

Will transpile and publish to npm, it will prompt you the version incrementing.

GitHub Page

  • yarn build

Will build the static demo and storybook apps for prod into the build folder

  • yarn deploy-github-page

Will deploy the built apps from 'build' folder to the 'gh-pages' github branch

Helper scripts

  • yarn build-and-deploy This helper script will call all the scripts for a complete GitHub building and deploying (yarn build && yarn deploy-github-page)
  • yarn publish-build-and-deploy This helper script will call all the scripts for a complete NPM and GitHub transpiling/building and publishing/deploying (yarn publish && yarn build-and-deploy)

You should then commit and push sources on GitHub the usual way.

This document was generated by the Create React Readme v1.0.7.

1.47.0

4 years ago

1.46.0

4 years ago

1.45.0

4 years ago

1.44.0

4 years ago

1.43.0

4 years ago

1.42.0

4 years ago

1.41.0

4 years ago

1.40.0

4 years ago

1.37.0

4 years ago

1.35.0

4 years ago

1.34.0

4 years ago

1.33.0

4 years ago

1.32.0

4 years ago

1.31.0

4 years ago

1.30.0

4 years ago

1.29.0

4 years ago

1.28.0

4 years ago

1.27.0

4 years ago

1.26.0

4 years ago

1.25.0

4 years ago

1.24.0

4 years ago