You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
1.1 KiB
44 lines
1.1 KiB
4 years ago
|
import { makeStyles } from '@material-ui/core/styles';
|
||
4 years ago
|
import { List, ListItem, ListItemText, Divider } from '@material-ui/core';
|
||
4 years ago
|
import { TEXT } from '../../lib/consts/DEFAULT_THEME';
|
||
|
import { BodyText } from '../Text';
|
||
4 years ago
|
|
||
|
const useStyles = makeStyles(() => ({
|
||
|
root: {
|
||
|
width: '100%',
|
||
4 years ago
|
'&:hover $child': {
|
||
|
backgroundColor: '#00ff00',
|
||
|
},
|
||
4 years ago
|
},
|
||
|
divider: {
|
||
|
background: TEXT,
|
||
|
},
|
||
4 years ago
|
button: {
|
||
|
'&:hover': {
|
||
|
backgroundColor: '#F6F6E8',
|
||
|
},
|
||
|
},
|
||
4 years ago
|
}));
|
||
|
|
||
|
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 (
|
||
4 years ago
|
<ListItem button key={anvil.anvil_uuid} className={classes.button}>
|
||
|
<ListItemText
|
||
|
primary={<BodyText text={anvil.anvil_name} />}
|
||
|
secondary={<BodyText text={anvil.anvil_state} />}
|
||
|
/>
|
||
4 years ago
|
</ListItem>
|
||
|
);
|
||
|
})}
|
||
|
</List>
|
||
|
);
|
||
|
};
|
||
|
|
||
|
export default AnvilList;
|