File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111 margin : 0 ;
1212 padding : 0 ;
1313 }
14+ .cell {
15+ display : flex;
16+ flex-direction : row;
17+ }
18+ .button {
19+ appearance : none;
20+ border : none;
21+ background-color : # DDD ;
22+ border-radius : 4px ;
23+ display : flex;
24+ align-content : center;
25+ }
1426 .input {
15- width : 100 % ;
27+ width : 50 px ;
1628 height : 100% ;
1729 box-sizing : border-box;
1830 }
31+ .image {
32+ height : 20px ;
33+ width : auto;
34+ }
1935 </ style >
2036 < script src ="https://cdnjs.cloudflare.com/ajax/libs/react/0.14.7/react.js "> </ script >
2137 < script src ="https://cdnjs.cloudflare.com/ajax/libs/react/0.14.7/react-dom.js "> </ script >
Original file line number Diff line number Diff line change 1+ var REACT_VIRTUALIZED_BANNER = 'https://cloud.githubusercontent.com/assets/29597/11737732/0ca1e55e-9f91-11e5-97f3-098f2f8ed866.png'
2+
13function renderCell ( params ) {
2- return React . DOM . input ( {
4+ var key = `c:${ params . columnIndex } , r:${ params . rowIndex } `
5+ var input = React . DOM . input ( {
36 className : 'input' ,
4- onChange : function ( ) { } ,
5- defaultValue : `column:${ params . columnIndex } , row:${ params . rowIndex } `
7+ defaultValue : key ,
8+ key : 'input' ,
9+ onChange : function ( ) { }
10+ } )
11+ var button = React . DOM . button ( {
12+ className : 'button' ,
13+ key : 'button'
14+ } , key )
15+ var image = React . DOM . img ( {
16+ className : 'image' ,
17+ key : 'image' ,
18+ src : REACT_VIRTUALIZED_BANNER
619 } )
20+
21+ return React . DOM . div ( {
22+ className : 'cell'
23+ } , [ input , button , image ] )
724}
825
926var App = React . createClass ( {
You can’t perform that action at this time.
0 commit comments