Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 636 Rev 904
Línea 1... Línea 1...
1
import React from "react";
1
import React from 'react'
2
import styled from "styled-components";
2
import styled from 'styled-components'
Línea 3... Línea 3...
3
 
3
 
Línea 4... Línea 4...
4
import FormErrorFeedback from "./FormErrorFeedBack";
4
import FormErrorFeedback from './FormErrorFeedBack'
5
 
5
 
6
const StyledInput = styled.div`
6
const StyledInput = styled.div`
7
  align-items: center;
7
  align-items: center;
Línea 11... Línea 11...
11
  cursor: pointer;
11
  cursor: pointer;
12
  display: flex;
12
  display: flex;
13
  min-height: 1.5rem;
13
  min-height: 1.5rem;
14
  padding: 0.5rem;
14
  padding: 0.5rem;
15
  gap: 5px;
15
  gap: 5px;
16
  width: -moz-available;
16
  box-sizing: border-box;
17
  width: -webkit-fill-available;
-
 
18
  width: fill-available;
17
  width: 100%;
19
  svg {
18
  svg {
20
    font-size: 1rem;
19
    font-size: 1rem;
21
  }
20
  }
22
  input {
21
  input {
23
    border: none;
22
    border: none;
24
    outline: none;
23
    outline: none;
25
    background: none;
24
    background: none;
26
    width: 100%;
25
    width: 100%;
27
  }
26
  }
28
`;
27
`
Línea 29... Línea 28...
29
 
28
 
30
const SearchInput = ({
29
const SearchInput = ({
31
  className = "",
30
  className = '',
32
  icon: Icon,
31
  icon: Icon,
33
  errors = {},
32
  errors = {},
34
  name = "",
33
  name = '',
35
  type = "text",
34
  type = 'text',
36
  onChange = () => {},
35
  onChange = () => {},
37
  placeholder = "",
36
  placeholder = '',
38
  ...props
37
  ...props
39
}) => {
38
}) => {
40
  return (
39
  return (
41
    <StyledInput className={className}>
40
    <StyledInput className={className}>
Línea 49... Línea 48...
49
      />
48
      />
50
      {errors[name] && (
49
      {errors[name] && (
51
        <FormErrorFeedback>{errors[name].message}</FormErrorFeedback>
50
        <FormErrorFeedback>{errors[name].message}</FormErrorFeedback>
52
      )}
51
      )}
53
    </StyledInput>
52
    </StyledInput>
54
  );
53
  )
55
};
54
}
Línea 56... Línea 55...
56
 
55