import * as prettyBytes from 'pretty-bytes'; import { makeStyles, Box, Divider } from '@material-ui/core'; import InsertLinkIcon from '@material-ui/icons/InsertLink'; import { InnerPanel, PanelHeader } from '../Panels'; import { BodyText } from '../Text'; import Decorator, { Colours } from '../Decorator'; import { DIVIDER } from '../../lib/consts/DEFAULT_THEME'; const useStyles = makeStyles((theme) => ({ root: { overflow: 'auto', height: '100%', paddingLeft: '.3em', [theme.breakpoints.down('md')]: { overflow: 'hidden', }, }, connection: { paddingLeft: '.7em', paddingRight: '.7em', paddingTop: '1em', paddingBottom: '.7em', }, bar: { paddingLeft: '.7em', paddingRight: '.7em', }, header: { paddingTop: '.3em', paddingRight: '.7em', }, label: { paddingTop: '.3em', }, decoratorBox: { paddingRight: '.3em', }, divider: { background: DIVIDER, }, })); const selectDecorator = (state: string): Colours => { switch (state) { case 'connected': return 'ok'; case 'connecting': return 'warning'; default: return 'error'; } }; const ResourceVolumes = ({ resource, }: { resource: AnvilReplicatedStorage; }): JSX.Element => { const classes = useStyles(); return ( {resource && resource.volumes.map((volume) => { return ( {volume.connections.map( (connection, index): JSX.Element => { return ( <> {volume.connections.length - 1 !== index ? ( ) : null} ); }, )} ); })} ); }; export default ResourceVolumes;