import { makeStyles } from '@material-ui/core/styles' import classnames from 'classnames' import React from 'react' import { P } from 'src/components/typography' import CompleteStageIconZodiac from 'src/styling/icons/stage/zodiac/complete.svg?react' import CurrentStageIconZodiac from 'src/styling/icons/stage/zodiac/current.svg?react' import EmptyStageIconZodiac from 'src/styling/icons/stage/zodiac/empty.svg?react' import styles from './Sidebar.styles' const useStyles = makeStyles(styles) const Sidebar = ({ data, displayName, isSelected, onClick, children, itemRender, loading = false }) => { const classes = useStyles() return (
{loading &&

Loading...

} {!loading && data?.map((it, idx) => (
onClick(it)}>
{itemRender ? itemRender(it, isSelected(it)) : displayName(it)}
))} {!loading && children}
) } export default Sidebar const Stepper = ({ step, it, idx, steps }) => { const classes = useStyles() const active = step === idx const past = idx < step const future = idx > step return (
{it.label} {active && } {past && } {future && } {idx < steps.length - 1 && (
)}
) } export { Stepper }