Proyectos de Subversion LeadersLinked - SPA

Rev

Rev 1565 | Rev 2641 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1565 Rev 1575
Línea 11... Línea 11...
11
 
11
 
12
const SideMenu = ({
12
const SideMenu = ({
13
  items = [],
13
  items = [],
14
  onChange = null,
14
  onChange = null,
15
  title = '',
15
  title = '',
-
 
16
  current = '',
-
 
17
  defaultValue = '',
16
  current = ''
18
  defaultLabel = ''
17
}) => {
19
}) => {
Línea 18... Línea 20...
18
  const handleChange = (value) => onChange(value)
20
  const handleChange = (value) => onChange(value)
19
 
21
 
20
  return (
22
  return (
Línea 21... Línea 23...
21
    <WidgetWrapper p={1}>
23
    <WidgetWrapper p={1}>
-
 
24
      <Typography variant='h2'>{title}</Typography>
-
 
25
 
-
 
26
      <List sx={{ mt: 1 }}>
-
 
27
        <ListItemButton
-
 
28
          sx={{ py: 0, display: defaultLabel ? 'initial' : 'none' }}
-
 
29
          onClick={() => handleChange(defaultValue)}
-
 
30
        >
-
 
31
          <ListItemText
-
 
32
            primary={defaultLabel}
-
 
33
            primaryTypographyProps={{
-
 
34
              sx: { fontWeight: current === defaultValue ? 'bold' : 'normal' }
22
      <Typography variant='h2'>{title}</Typography>
35
            }}
23
 
36
          />
24
      <List sx={{ mt: 1 }}>
37
        </ListItemButton>
25
        {items.map(({ value, name }) => (
38
        {items.map(({ value, name }) => (
26
          <ListItem key={value} sx={{ p: 0 }}>
39
          <ListItem key={value} sx={{ p: 0 }}>