blob: 7768f9ec4140132238cb9d67ee803f0b0c670e84 (
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
|
import React from 'react';
export default React.createClass({
propTypes: {
permissions: React.PropTypes.arrayOf(React.PropTypes.object).isRequired
},
render() {
let cellWidth = (80 / this.props.permissions.length) + '%';
let cells = this.props.permissions.map(p => {
return (
<th key={p.key} style={{ width: cellWidth }}>
{p.name}<br/><span className="small">{p.description}</span>
</th>
);
});
return (
<thead>
<tr>
<th style={{ width: '20%' }}> </th>
{cells}
<th className="thin"> </th>
</tr>
</thead>
);
}
});
|