parent
8d5a85aaad
commit
0f8c2452fd
2 changed files with 39 additions and 4 deletions
@ -0,0 +1,35 @@ |
||||
import { makeStyles } from '@material-ui/core/styles'; |
||||
import List from '@material-ui/core/List'; |
||||
import ListItem from '@material-ui/core/ListItem'; |
||||
import Divider from '@material-ui/core/Divider'; |
||||
import { BodyText } from './Text'; |
||||
import { TEXT } from '../lib/consts/DEFAULT_THEME'; |
||||
|
||||
const useStyles = makeStyles(() => ({ |
||||
root: { |
||||
width: '100%', |
||||
}, |
||||
divider: { |
||||
background: TEXT, |
||||
}, |
||||
})); |
||||
|
||||
const AnvilList = ({ list }: { list: AnvilListItem[] }): JSX.Element => { |
||||
const classes = useStyles(); |
||||
|
||||
return ( |
||||
<List component="nav" className={classes.root} aria-label="mailbox folders"> |
||||
<Divider className={classes.divider} /> |
||||
{list.map((anvil) => { |
||||
return ( |
||||
<ListItem button key={anvil.anvil_uuid}> |
||||
<BodyText text={anvil.anvil_name} /> |
||||
<BodyText text={anvil.anvil_state} /> |
||||
</ListItem> |
||||
); |
||||
})} |
||||
</List> |
||||
); |
||||
}; |
||||
|
||||
export default AnvilList; |
Loading…
Reference in new issue