Files
bee-dashboard/src/components/ProgressIndicator.tsx
T
Cafe137 25b65c3fb7 feat: add identity and feed management (#272)
* feat(wip): add basic feed operations

* ci: bump checks

* ci: bump checks

* feat: rework stamps and add feed functionalities

* refactor: polish and fixes

* feat(wip): add formulas

* feat: show bzz.link for websites

* feat: add stamp empty states and formatBzz

* feat: add feed download

* chore: update manifest-js version

* feat: dev mode support with bee-js 3.1.0 (#273)

* feat: dev mode support with bee-js 3.1.0

* fix: added missing package-lock.json file

* build: remove PR preview

* style: work on design

* feat: add TroubleshootConnectionCard

* build: remove depcheck

Co-authored-by: Attila Gazso <agazso@gmail.com>
2021-12-21 10:58:54 +01:00

56 lines
1.1 KiB
TypeScript

import { createStyles, Grid, makeStyles, Typography } from '@material-ui/core'
import { ReactElement } from 'react'
interface Props {
steps: string[]
index: number
}
const useStyles = makeStyles(() =>
createStyles({
wrapper: {
height: '52px',
display: 'flex',
flex: 1,
justifyContent: 'center',
alignItems: 'center',
},
todo: {
background: '#f7f7f7',
color: '#c9c9c9',
},
inProgress: {
background: '#ffffff',
color: '#242424',
height: '52px',
},
done: {
background: '#f7f7f7',
color: '#606060',
height: '52px',
},
}),
)
export function ProgressIndicator({ steps, index }: Props): ReactElement {
const classes = useStyles()
function pickClass(i: number): string {
if (i === index) {
return classes.inProgress
}
return i < index ? classes.done : classes.todo
}
return (
<Grid container justifyContent="space-between">
{steps.map((x, i) => (
<div key={i} className={`${classes.wrapper} ${pickClass(i)}`}>
<Typography>{x}</Typography>
</div>
))}
</Grid>
)
}