Created
September 10, 2020 19:46
-
-
Save nicolasleal570/d2a47d382e0b66c295ef86e5ac3cdc14 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
interface Props { | |
index: number; | |
steps: Array<{ id: number; title: string }>; | |
} | |
export default function ({ index, steps = [] }: Props) { | |
return ( | |
<ul className="progressBar"> | |
{steps.map(({ id, title }) => ( | |
<li className={`${index === id || index > id ? "active" : ""}`}> | |
{title} | |
</li> | |
))} | |
</ul> | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment