UNPKG

@akshay641/react-step-progress-bar

Version:

A customizable React stepper progress component.

3 lines (2 loc) 680 B
import"react";import r from"prop-types";const e=({totalSteps:r,currentStep:e,activeColor:t="#0E66CE",inactiveColor:i="gray",height:s="4px",margin:a="0 0.5rem",borderRadius:o="9px",className:n=""})=>{const m=Array.from({length:r});return h("div",{className:`flex items-center justify-between mb-4 ${n}`},m.map((r,n)=>h("div",{key:n,style:{height:s,flex:1,margin:a,borderRadius:o,backgroundColor:n<=e?t:i}})))};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.modern.mjs.map