Proyectos de Subversion LeadersLinked - SPA

Rev

Rev 3101 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 3101 Rev 3719
Línea 1... Línea 1...
1
import React from 'react'
1
import React from 'react';
2
import { Box, styled, Typography } from '@mui/material'
2
import { Box, styled, Typography } from '@mui/material';
3
 
3
 
4
const EmptyContainer = styled(Box)`
4
const EmptyContainer = styled(Box)`
5
  display: flex;
5
  display: flex;
6
  box-sizing: border-box;
6
  box-sizing: border-box;
7
  justify-content: center;
7
  justify-content: center;
8
  flex-direction: column;
8
  flex-direction: column;
9
  padding: 1rem;
9
  padding: 1rem;
10
  width: 100%;
10
  width: 100%;
11
  flex-grow: 1;
11
  flex-grow: 1;
12
`
12
`;
13
 
13
 
14
const EmptySection = ({
-
 
15
  Icon = null,
-
 
16
  message = 'No hay publicaciones',
14
const EmptySection = ({ Icon = null, message = 'No hay publicaciones', align = 'left' }) => {
17
  align = 'left'
-
 
18
}) => {
-
 
19
  const alignOptions = {
15
  const alignOptions = {
20
    left: 'flex-start',
16
    left: 'flex-start',
21
    right: 'flex-end',
17
    right: 'flex-end',
22
    center: 'center'
18
    center: 'center'
23
  }
19
  };
24
 
20
 
25
  return (
21
  return (
26
    <EmptyContainer alignItems={alignOptions[align]}>
22
    <EmptyContainer alignItems={alignOptions[align]}>
27
      {Icon && Icon}
23
      {Icon && Icon}
28
      <Typography sx={{ fontWeight: 600 }}>{message}</Typography>
24
      <Typography sx={{ fontWeight: 600 }}>{message}</Typography>
29
    </EmptyContainer>
25
    </EmptyContainer>
30
  )
26
  );
31
}
27
};
32
 
28
 
33
export default EmptySection
29
export default EmptySection;