Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 5 Rev 856
Línea 1... Línea 1...
1
import React from 'react'
1
import React from 'react'
-
 
2
import styled from 'styled-components'
-
 
3
 
-
 
4
const StyledEmptyContainer = styled.div`
-
 
5
  display: flex;
-
 
6
  align-items: ${(props) => (props.align ? props.align : 'left')};
-
 
7
  justify-content: center;
-
 
8
  flex-direction: column;
-
 
9
  padding: 1rem;
-
 
10
  p {
-
 
11
    font-weight: 600;
-
 
12
  }
-
 
13
`
Línea 2... Línea 14...
2
 
14
 
3
const EmptySection = ({
15
const EmptySection = ({
4
  Icon = null,
16
  Icon = null,
5
  message = 'No hay publicaciones',
17
  message = 'No hay publicaciones',
6
  align = 'left',
18
  align = 'left'
7
}) => {
19
}) => {
8
  const alignOptions = {
20
  const alignOptions = {
9
    left: 'flex-start',
21
    left: 'flex-start',
10
    right: 'flex-end',
22
    right: 'flex-end',
11
    center: 'center',
23
    center: 'center'
Línea 12... Línea 24...
12
  }
24
  }
13
 
25
 
14
  return (
26
  return (
15
    <div className="empty__section" style={{ alignItems: alignOptions[align] }}>
27
    <StyledEmptyContainer align={alignOptions[align]}>
16
      {Icon && Icon}
28
      {Icon && Icon}
17
      <p>{message}</p>
29
      <p>{message}</p>
18
    </div>
30
    </StyledEmptyContainer>
Línea 19... Línea 31...
19
  )
31
  )