1
1
import React , { Component } from 'react' ;
2
2
import { Helmet } from 'react-helmet' ;
3
3
import { Grid , Row , Col } from 'react-bootstrap' ;
4
+ import SplitPane from 'react-split-pane' ;
4
5
import QueryBox from './components/QueryBox' ;
5
6
import TabbedResults from './components/TabbedResults' ;
6
7
import api from './api' ;
@@ -102,7 +103,7 @@ GROUP BY committer_email, month, repo_id`,
102
103
let resultsElem = '' ;
103
104
if ( results . size > 0 ) {
104
105
resultsElem = (
105
- < Col xs = { 12 } >
106
+ < Col xs = { 12 } className = "full-height" >
106
107
< TabbedResults
107
108
results = { results }
108
109
handleRemoveResult = { this . handleRemoveResult }
@@ -111,24 +112,33 @@ GROUP BY committer_email, month, repo_id`,
111
112
</ Col >
112
113
) ;
113
114
}
114
-
115
115
return (
116
116
< div className = "app" >
117
117
< Helmet >
118
118
< title > Gitbase Playground</ title >
119
119
</ Helmet >
120
- < Grid >
121
- < Row className = "query-row" >
122
- < Col xs = { 12 } >
123
- < QueryBox
124
- sql = { this . state . sql }
125
- schema = { this . state . schema }
126
- handleTextChange = { this . handleTextChange }
127
- handleSubmit = { this . handleSubmit }
128
- />
120
+ < Grid className = "full-height" >
121
+ < Row className = "full-height" >
122
+ < Col xs = { 12 } className = "full-height" >
123
+ < SplitPane split = "horizontal" defaultSize = { 250 } minSize = { 100 } >
124
+ < Grid className = "full-height full-width" >
125
+ < Row className = "query-box-row" >
126
+ < Col xs = { 12 } className = "full-height" >
127
+ < QueryBox
128
+ sql = { this . state . sql }
129
+ schema = { this . state . schema }
130
+ handleTextChange = { this . handleTextChange }
131
+ handleSubmit = { this . handleSubmit }
132
+ />
133
+ </ Col >
134
+ </ Row >
135
+ </ Grid >
136
+ < Grid className = "full-height full-width" >
137
+ < Row className = "results-row" > { resultsElem } </ Row >
138
+ </ Grid >
139
+ </ SplitPane >
129
140
</ Col >
130
141
</ Row >
131
- < Row className = "results-row" > { resultsElem } </ Row >
132
142
</ Grid >
133
143
</ div >
134
144
) ;
0 commit comments