Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 333 Rev 340
Línea 1... Línea 1...
1
import React from "react";
1
import React from "react";
Línea 2... Línea 2...
2
 
2
 
Línea 3... Línea 3...
3
const Option = (props) => {
3
const Option = (props) => {
4
 
4
 
Línea 5... Línea 5...
5
    // get props
5
    // get props
6
    const { question } = props;
6
    const { question, handleAnswer } = props;
7
 
7
 
8
    return (
8
    return (
Línea 21... Línea 21...
21
                        }
21
                        }
22
                        {question.type != 'multiple' &&
22
                        {question.type != 'multiple' &&
Línea 23... Línea 23...
23
 
23
 
24
                            <input
24
                            <input
-
 
25
                                type="radio"
-
 
26
 
-
 
27
                                onChange={e => handleAnswer(
-
 
28
                                    question.slug_section,
-
 
29
                                    question.slug_question,
-
 
30
                                    e.target.value)}
25
                                type="radio"
31
 
26
                                name={`${opt.slug_question}`}
32
                                name={`${opt.slug_question}`}
27
                                value={opt.slug_option} />
33
                                value={opt.slug_option} />
28
                        }
34
                        }
29
                        <div
35
                        <div