Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 1260 Rev 1261
Línea 1... Línea 1...
1
import React from 'react'
1
import React from 'react'
2
import { useController } from 'react-hook-form'
2
import { useController } from 'react-hook-form'
3
import styled from 'styled-components'
3
import styled, { css } from 'styled-components'
Línea 4... Línea 4...
4
 
4
 
Línea 5... Línea 5...
5
import FormErrorFeedback from '../FormErrorFeedback'
5
import FormErrorFeedback from '../FormErrorFeedback'
6
 
6
 
Línea 31... Línea 31...
31
      visibility: hidden;
31
      visibility: hidden;
32
    }
32
    }
33
  }
33
  }
Línea 34... Línea 34...
34
 
34
 
35
  input {
35
  input {
36
    visibility: hidden;
-
 
37
  }
-
 
38
 
-
 
39
  input:checked ~ span::before {
-
 
40
    visibility: 1;
-
 
41
    opacity: 1;
36
    display: none;
Línea 42... Línea 37...
42
  }
37
  }
43
 
38
 
44
  label {
39
  label {
45
    font-size: 14px;
40
    font-size: 14px;
46
    margin-left: 10px;
41
    margin-left: 10px;
-
 
42
    line-height: 1;
-
 
43
  }
-
 
44
 
-
 
45
  ${(props) =>
-
 
46
    props.isChecked &&
-
 
47
    css`
-
 
48
      span::before {
-
 
49
        visibility: 1;
-
 
50
        opacity: 1;
47
    line-height: 1;
51
      }
Línea 48... Línea 52...
48
  }
52
    `}
49
`
53
`
50
 
54
 
Línea 55... Línea 59...
55
    rules
59
    rules
56
  })
60
  })
Línea 57... Línea 61...
57
 
61
 
58
  return (
62
  return (
59
    <>
63
    <>
60
      <CheckboxContainer>
64
      <CheckboxContainer isChecked={field.value}>
61
        <span></span>
65
        <span></span>
62
        <input
66
        <input
63
          type='checkbox'
67
          type='checkbox'
64
          onChange={field.onChange}
68
          onChange={field.onChange}