67 |
68 | {
69 | typeof this.props.result.progress === 'number' ? (
70 |
71 | {result.name}
72 |
79 |
80 | ) : (
81 | this.collapse()}>
82 | {this.state.collapseOpen ? : }
83 | {result.name}
84 |
91 |
92 | )
93 | }
94 |
95 | {typeof result.progress !== 'number' && (
96 |
97 | {
98 | Object
99 | .keys(result.progress)
100 | .map((item, key) => {
101 | const value = result.progress[item] * 100;
102 |
103 | return (
104 |
105 |
112 | {item}
113 |
114 | );
115 | })
116 | }
117 |
118 | )}
119 |
120 | {scores.map((score, key) => (
121 |
127 | ))}
128 |
129 |
130 |
131 | );
132 | }
133 | }
134 |
--------------------------------------------------------------------------------
/okr-dashboard/src/components/Label.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | export const Label = ({ children, type = 'default' }) => (
4 |