aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/KeyphraseQueryView.tsx
blob: e996fc946d1012795d76a4314aea7f5328e7e83d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import { observer } from 'mobx-react';
import * as React from 'react';
import './KeyphraseQueryView.scss';

// tslint:disable-next-line: class-name
export interface KP_Props {
    keyphrases: string;
}

@observer
export class KeyphraseQueryView extends React.Component<KP_Props> {
    constructor(props: KP_Props) {
        super(props);
    }

    render() {
        const kps = this.props.keyphrases.toString();
        const keyterms = this.props.keyphrases.split(',');
        return (
            <div>
                <h5>Select queries to send:</h5>
                <form>
                    {keyterms.map((kp: string) => {
                        //return (<p>{"-" + kp}</p>);
                        return (
                            <p>
                                <label>
                                    <input name="query" type="radio" />
                                    <span>{kp}</span>
                                </label>
                            </p>
                        );
                    })}
                </form>
            </div>
        );
    }
}