Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 6439 Rev 6440
Línea 8... Línea 8...
8
 
8
 
9
import LockClockIcon from '@mui/icons-material/LockClock'
9
import LockClockIcon from '@mui/icons-material/LockClock'
Línea 10... Línea 10...
10
import PublicIcon from '@mui/icons-material/Public'
10
import PublicIcon from '@mui/icons-material/Public'
-
 
11
 
-
 
12
import styles from './survey.module.scss'
-
 
13
import styled, { css } from 'styled-components'
-
 
14
 
-
 
15
const RadioButton = styled.div`
-
 
16
  display: flex;
-
 
17
  align-items: center;
-
 
18
  gap: 0.5rem;
-
 
19
  padding: 0.5rem 1rem;
-
 
20
  margin-bottom: 0.5rem;
-
 
21
  border: 2px solid $border-primary;
-
 
22
  border-radius: 50px;
-
 
23
  cursor: pointer;
-
 
24
  transition: all 200ms ease;
-
 
25
  position: relative;
-
 
26
 
-
 
27
  input {
-
 
28
    margin: 0 !important;
-
 
29
  }
-
 
30
 
-
 
31
  label {
-
 
32
    color: $font-color;
-
 
33
    font-weight: 500;
-
 
34
  }
-
 
35
 
-
 
36
  &::before {
-
 
37
    content: ' ';
-
 
38
    position: absolute;
-
 
39
    left: 0;
-
 
40
    top: 0;
-
 
41
    height: 100%;
-
 
42
    width: ${(props) => props.$porcentage || '0%'};
-
 
43
    background-color: #0006;
-
 
44
    z-index: 4;
-
 
45
  }
-
 
46
 
-
 
47
  &:hover {
-
 
48
    border-color: $font-color;
-
 
49
    text-shadow: 0 0 1px $font-color;
-
 
50
  }
-
 
51
 
-
 
52
  ${(props) =>
-
 
53
    props.$disabled &&
-
 
54
    css`
-
 
55
      background: #9992;
-
 
56
      cursor: auto;
-
 
57
 
-
 
58
      label {
-
 
59
        color: gray;
-
 
60
      }
-
 
61
 
-
 
62
      &:hover {
-
 
63
        border-color: $border-primary;
-
 
64
        text-shadow: none;
-
 
65
      }
Línea 11... Línea 66...
11
 
66
    `}
12
import styles from './survey.module.scss'
67
`
13
 
68
 
14
const SurveyForm = ({
69
const SurveyForm = ({
Línea 105... Línea 160...
105
        </span>
160
        </span>
106
      )}
161
      )}
107
      {answers.map(
162
      {answers.map(
108
        (option, index) =>
163
        (option, index) =>
109
          option && (
164
          option && (
110
            <div
-
 
111
              className={
-
 
112
                isActive
-
 
113
                  ? styles.survey_input
-
 
114
                  : styles.survey_input + ' ' + styles.disabled
165
            <RadioButton disabled={!isActive} porcentage={'50%'} key={index}>
115
              }
-
 
116
              key={index}
-
 
117
              data-width={50}
-
 
118
            >
-
 
119
              <input
166
              <input
120
                type="radio"
167
                type="radio"
121
                name="vote"
168
                name="vote"
122
                id={`vote-${index + 1}`}
169
                id={`vote-${index + 1}`}
123
                disabled={!isActive}
170
                disabled={!isActive}
124
                ref={register({ required: true })}
171
                ref={register({ required: true })}
125
                value={index + 1}
172
                value={index + 1}
126
              />
173
              />
127
              <label htmlFor={`vote-${index + 1}`}>{option}</label>
174
              <label htmlFor={`vote-${index + 1}`}>{option}</label>
128
            </div>
175
            </RadioButton>
129
          )
176
          )
130
      )}
177
      )}
131
      <span>Tiempo restante: {remainingTime}</span>
178
      <span>Tiempo restante: {remainingTime}</span>
132
    </form>
179
    </form>
133
  )
180
  )