Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 306 Rev 315
Línea 1... Línea 1...
1
import React from "react";
1
import React from "react";
Línea 2... Línea 2...
2
 
2
 
3
const Option = (props) => {
3
const Option = (props) => {
4
    
4
 
5
    // get props
5
    // get props
Línea 6... Línea 6...
6
    const { question } = props;
6
    const { question } = props;
7
 
7
 
8
    return (
8
    return (
9
        <div>
9
        <div>
10
            {question.options.map((opt, key) => {
10
            {question.options.map((opt, key) => {
11
                return (
11
                return (
12
                    <div className="checkbox">
12
                    <div className="checkbox">
13
                        <input
13
                        <input
14
                            type="checkbox"
14
                            type="checkbox"
15
                            name={`${opt.option_slug}[]`}
15
                            name={`${opt.slug_option}[]`}
16
                            id={option_slug}
16
                            id={slug_option}
17
                            key={key}
17
                            key={key}
-
 
18
                            value={opt.slug_option} />
-
 
19
                        <div
-
 
20
                            dangerouslySetInnerHTML={{ __html: opt.text }}
Línea 18... Línea 21...
18
                            value={opt.option_slug} />
21
                            className="option"
19
                        {opt.text}
22
                        />
20
 
23
 
21
                    </div>
24
                    </div>