Some small style things

This commit is contained in:
Gregory Schier committed 2016-06-18 17:17:20 -07:00
1 parent 26fb1e2714
commit 5b8aa7545d
4 files changed
+23 -7

No files matched your search

+5 -3
View File
@@ -56,17 +56,19 @@ class RequestPane extends Component {
</Tab>
<Tab>
<button>
Params {request.params.length ? `(${request.params.length})` : ''}
Params {request.params.length ? (
<span className="txt-sm">({request.params.length})</span> ) : null}
</button>
</Tab>
<Tab>
<button>
Auth {request.authentication.username ? <i className="fa fa-lock"></i> : ''}
Auth {request.authentication.username ? <i className="fa fa-lock txt-sm"></i> : ''}
</button>
</Tab>
<Tab>
<button>
Headers {request.headers.length ? `(${request.headers.length})` : ''}
Headers {request.headers.length ? (
<span className="txt-sm">({request.headers.length})</span> ) : null}
</button>
</Tab>
</TabList>
+6 -1
View File
@@ -47,7 +47,12 @@ class ResponsePane extends Component {
updatePreviewMode={updatePreviewMode}
/>
</Tab>
<Tab><button>Headers</button></Tab>
<Tab>
<button>
Headers {response.headers.length ? (
<span className="txt-sm">({response.headers.length})</span> ) : null}
</button>
</Tab>
</TabList>
<TabPanel>
{response.error ? (
+8 -3
View File
@@ -71,9 +71,14 @@ class App extends Component {
const requestPaneWidth = requestPane.offsetWidth;
const responsePaneWidth = responsePane.offsetWidth;
const pixelOffset = e.clientX - requestPane.offsetLeft;
const ratio = pixelOffset / (requestPaneWidth + responsePaneWidth);
const paneWidth = Math.max(Math.min(ratio, 0.6), 0.4);
let paneWidth = pixelOffset / (requestPaneWidth + responsePaneWidth);
if (paneWidth < 0.1) {
paneWidth = 0.01;
} else if (paneWidth > 0.9) {
paneWidth = 0.99;
}
this.setState({paneWidth});
} else if (this.state.draggingSidebar) {
this.refs.sidebar.resize(e.clientX);
+4
View File
@@ -119,6 +119,10 @@ i.fa {
white-space: pre-wrap;
}
.no-wrap {
white-space: nowrap;
}
.pad {
box-sizing: border-box;
padding: $padding-md;