1 | // @flow
|
2 | import React, { type Node } from "react"
|
3 |
|
4 | export type Props = {
|
5 | line: number,
|
6 | code: string,
|
7 | todo: boolean
|
8 | }
|
9 |
|
10 | const style = {
|
11 | margin: "0px",
|
12 | padding: "0px",
|
13 | border: "none"
|
14 | }
|
15 |
|
16 | const todoStyle = {
|
17 | margin: "0px",
|
18 | padding: "0px",
|
19 | backgroundColor: "#FFC0CB",
|
20 | border: "none"
|
21 | }
|
22 |
|
23 | // TODO : foo
|
24 | const lineStyle = {
|
25 | textAlign: "left",
|
26 | width: "20px",
|
27 | fontSize: "15px",
|
28 | margin: "0px",
|
29 | padding: "0px",
|
30 | border: "none",
|
31 | backgroundColor: "#F7F7F7",
|
32 | paddingLeft: "30px",
|
33 | color: "#A29999"
|
34 | }
|
35 |
|
36 | const todoLineStyle = {
|
37 | textAlign: "left",
|
38 | width: "20px",
|
39 | fontSize: "15px",
|
40 | margin: "0px",
|
41 | padding: "0px",
|
42 | border: "none",
|
43 | backgroundColor: "#FFC0CB",
|
44 | paddingLeft: "30px",
|
45 | color: "#A29999"
|
46 | }
|
47 |
|
48 | // TODO : bar
|
49 | export default ({ line, code, todo }: Props) => (
|
50 | <tr style={!todo ? style : todoStyle}>
|
51 | <td style={!todo ? lineStyle : todoLineStyle}>{line}</td>
|
52 | <td
|
53 | style={{
|
54 | textAlign: "left",
|
55 | fontSize: "15px",
|
56 | margin: "0px",
|
57 | border: "none",
|
58 | paddingLeft: "5px"
|
59 | }}
|
60 | id={`L${line}`}
|
61 | >
|
62 | <pre style={{ margin: "0px", padding: "0px", border: "none" }}>
|
63 | <code>
|
64 | <span>{code}</span>
|
65 | </code>
|
66 | </pre>
|
67 | </td>
|
68 | </tr>
|
69 | )
|