Proyectos de Subversion LeadersLinked - SPA

Rev

Rev 875 | Ir a la última revisión | Autoría | Comparar con el anterior | Ultima modificación | Ver Log |

import React from 'react'
import { Box, styled, Typography } from '@mui/material'

const EmptyContainer = styled(Box)`
  display: flex;
  box-sizing: border-box;
  justify-content: center;
  flex-direction: column;
  padding: 1rem;
  width: 100%;
  flex-grow: 1;
`

const EmptySection = ({
  Icon = null,
  message = 'No hay publicaciones',
  align = 'left'
}) => {
  const alignOptions = {
    left: 'flex-start',
    right: 'flex-end',
    center: 'center'
  }

  return (
    <EmptyContainer alignItems={alignOptions[align]}>
      {Icon && Icon}
      <Typography sx={{ fontWeight: 600 }}>{message}</Typography>
    </EmptyContainer>
  )
}

export default EmptySection