-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
68 lines (55 loc) · 1.27 KB
/
index.js
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
import React from 'react'
import ReactDOM from 'react-dom'
import OverwatchTable from '../lib'
import SVG_MATERIAL_CHECK from 'svg-icon/dist/svg/material/check.svg'
import SVG_MATERIAL_CLOSE from 'svg-icon/dist/svg/material/close.svg'
import general from '@likethemammal/general-components'
const { SVG } = general.components
const iconStyles = {
width: '35px',
top: '3px',
position: 'relative'
}
const rows = [
{
name: 'Genji',
one_trick: <SVG raw={SVG_MATERIAL_CHECK} style={iconStyles}/>,
weapon_type: 'shuriken',
},
{
name: 'Winston',
one_trick: <SVG raw={SVG_MATERIAL_CLOSE} style={iconStyles}/>,
weapon_type: 'Banana Peel',
},
{
name: 'Symmetra',
one_trick: <SVG raw={SVG_MATERIAL_CHECK} style={iconStyles}/>,
weapon_type: 'Long Range Beam'
},
{
name: 'Torb',
one_trick: <SVG raw={SVG_MATERIAL_CHECK} style={iconStyles}/>,
weapon_type: 'Too many children',
},
]
const columnLabels = {
name: 'Hero Name',
one_trick: 'Can One-Trick',
weapon_type: 'Weapon Type'
}
const columnOrder = [
'name',
'weapon_type',
'one_trick',
]
const props = {
rows,
columnLabels,
columnOrder,
}
ReactDOM.render(
<OverwatchTable
{...props}
/>,
document.getElementById('app')
)