UNPKG

@akshay641/react-step-progress-bar

Version:

A customizable React stepper progress component.

3 lines (2 loc) 793 B
import"react";import r from"prop-types";var e=function(r){var e=r.currentStep,i=r.activeColor,t=void 0===i?"#0E66CE":i,o=r.inactiveColor,a=void 0===o?"gray":o,n=r.height,s=void 0===n?"4px":n,d=r.margin,m=void 0===d?"0 0.5rem":d,p=r.borderRadius,u=void 0===p?"9px":p,g=r.className,l=void 0===g?"":g,c=Array.from({length:r.totalSteps});return h("div",{className:"flex items-center justify-between mb-4 "+l},c.map(function(r,i){return h("div",{key:i,style:{height:s,flex:1,margin:m,borderRadius:u,backgroundColor:i<=e?t:a}})}))};e.propTypes={totalSteps:r.number.isRequired,currentStep:r.number.isRequired,activeColor:r.string,inactiveColor:r.string,height:r.string,margin:r.string,borderRadius:r.string,className:r.string};export{e as Stepper,e as default}; //# sourceMappingURL=index.esm.js.map