(props: { step: number })
| 2 | import classNames from "classnames"; |
| 3 | |
| 4 | export default function ProgressBar(props: { step: number }) { |
| 5 | return ( |
| 6 | <div className="fixed bottom-5 inset-x-20 md:inset-x-40"> |
| 7 | <h4 className="sr-only">Status</h4> |
| 8 | <div className="mt-6" aria-hidden="true"> |
| 9 | <div className="overflow-hidden rounded-full bg-gray-200"> |
| 10 | <div |
| 11 | className="h-2 rounded-full bg-purple-600 transition-all ease-in-out duration-1000" |
| 12 | style={{ |
| 13 | width: |
| 14 | props.step === 0 |
| 15 | ? "25%" |
| 16 | : props.step === 1 |
| 17 | ? "50%" |
| 18 | : props.step === 2 |
| 19 | ? "83.4%" |
| 20 | : "100%", |
| 21 | }} |
| 22 | /> |
| 23 | </div> |
| 24 | <div className="mt-6 hidden grid-cols-3 font-medium text-gray-600 sm:grid"> |
| 25 | <div className={classNames("text-center text-purple-600")}> |
| 26 | Sign up |
| 27 | </div> |
| 28 | <div |
| 29 | className={classNames( |
| 30 | "text-center", |
| 31 | props.step > 1 && "text-purple-600", |
| 32 | props.step === 1 && "text-gray-100", |
| 33 | )} |
| 34 | > |
| 35 | Upload API Spec |
| 36 | </div> |
| 37 | <div |
| 38 | className={classNames( |
| 39 | "text-center", |
| 40 | props.step > 2 && "text-purple-600", |
| 41 | props.step === 2 && "text-gray-100", |
| 42 | )} |
| 43 | > |
| 44 | Connect to API |
| 45 | </div> |
| 46 | </div> |
| 47 | </div> |
| 48 | </div> |
| 49 | ); |
| 50 | } |
nothing calls this directly
no test coverage detected