All Downloads are FREE. Search and download functionalities are using the official Maven repository.

components.view.drawer.DrawerLinks.js Maven / Gradle / Ivy

import { List, Tooltip } from '@mui/material';
import ListItem from '@mui/material/ListItem';
import ListItemButton from '@mui/material/ListItemButton';
import ListItemIcon from '@mui/material/ListItemIcon';
import ListItemText from '@mui/material/ListItemText';
import { useViewLinks } from 'components/view/utils/link';
import { createListItemSx } from 'components/view/drawer/menu';
import merge from 'deepmerge';
import { GearsIcon } from 'components/process/GearsIcon';

const ViewLinks = ({links: schemaLinks, open}) => {
  const resultLinks = useViewLinks(schemaLinks)
  return (
    
      { resultLinks.map((link, index) => ) }
    
  )
}

const DrawerLink = ({link, open}) => {
  const classes     = createSx({open})
  const menuClasses = createListItemSx({})
  const sx          = merge.all([menuClasses.menuitem, classes.menuitem, {display: 'block'}])

  return (
    
      
        
          
            
          
          
        
      
    
  )
}

const createSx = ({open}) => ({
  menuitem: {
  '& .MuiListItemButton-root': {
    minHeight: 48,
    justifyContent: open ? 'initial' : 'center',
    '& .MuiListItemIcon-root': {
      minWidth: 0,
      marginLeft: '4px',
      marginRight: open ? '8px' : 0,
      justifyContent: 'center',
    },
    '& .MuiListItemText-root': {
        opacity: open ? 1 : 0
      }
    }
  }
})

export default ViewLinks




© 2015 - 2024 Weber Informatics LLC | Privacy Policy