-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathAlignOutput.js
More file actions
43 lines (36 loc) · 1.09 KB
/
AlignOutput.js
File metadata and controls
43 lines (36 loc) · 1.09 KB
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
39
40
41
42
43
import React, { Component } from 'react';
import { Row, Col, Well } from 'react-bootstrap/lib';
import SeqPair from './SeqPair';
class AlignOutput extends Component {
makeSeqPairs() {
const { output } = this.props;
if (output[0] === '') {
return <p style={{ color: '#8e8e8e' }}>Alignment output will appear here</p>;
}
const labelStyle = {
whiteSpace: 'pre-wrap',
display: 'inline-block',
width: '100px',
textAlign: 'left',
paddingTop: '10px',
paddingBottom: '10px',
};
const labelText = 'Sequence1:\n\nSequence2:';
const label = [<div style={labelStyle} key={-1}>{labelText}</div>];
return label.concat(output.map((seqPair, i) => <SeqPair seqPair={seqPair} ind={i} key={i} />));
}
render() {
return (
<Row>
<Col xs={12}>
<Well style={{ minHeight: this.props.height }} >{this.makeSeqPairs()}</Well>
</Col>
</Row>
);
}
}
AlignOutput.propTypes = {
output: React.PropTypes.arrayOf(React.PropTypes.string).isRequired,
height: React.PropTypes.number,
};
export default AlignOutput;