import { Box, Switch } from '@material-ui/core'; import { makeStyles } from '@material-ui/core/styles'; import { InnerPanel, PanelHeader } from '../Panels'; import { ProgressBar } from '../Bars'; import { BodyText } from '../Text'; import nodeState from '../../lib/consts/NODES'; import Decorator, { Colours } from '../Decorator'; const useStyles = makeStyles((theme) => ({ root: { overflow: 'auto', height: '24vh', paddingLeft: '0.3em', [theme.breakpoints.down('md')]: { height: '100%', overflow: 'hidden', }, }, state: { paddingLeft: '0.7em', paddingRight: '0.7em', paddingTop: '1em', }, bar: { paddingLeft: '0.7em', paddingRight: '0.7em', }, header: { paddingTop: '0.3em', paddingRight: '0.7em', }, label: { paddingTop: '0.3em', }, decoratorBox: { paddingRight: '0.3em', }, })); const selectDecorator = (state: string): Colours => { switch (state) { case 'ready': return 'ok'; case 'off': return 'off'; case 'accessible': case 'on': return 'warning'; default: return 'error'; } }; const AnvilNode = ({ nodes, }: { nodes: Array; }): JSX.Element => { const classes = useStyles(); return ( {nodes && nodes.map( (node): JSX.Element => { return ( {node.state !== 'ready' && ( <> )} ); }, )} ); }; export default AnvilNode;