Query results section ui updated

- json ui emphasized
- min-height added to stop screen bouncing when navigating across tabs
- spacing adjusted
This commit is contained in:
Joe 2021-02-22 09:01:40 +00:00
parent b6c6b52dac
commit 7166f11a1d
1 changed files with 15 additions and 10 deletions

View File

@ -177,9 +177,11 @@
schema={queryConfig[query.queryVerb]} schema={queryConfig[query.queryVerb]}
bind:parameters /> bind:parameters />
<Spacer extraLarge /> <Spacer extraLarge />
<hr />
<Spacer extraLarge /> <Spacer extraLarge />
<Spacer medium />
<div class="viewer-controls"> <div class="viewer-controls">
<Heading extraSmall lh>Query Results</Heading> <Heading small lh>Results</Heading>
<div class="button-container"> <div class="button-container">
<Button <Button
secondary secondary
@ -198,6 +200,7 @@
</Body> </Body>
<Spacer extraLarge /> <Spacer extraLarge />
<Spacer medium />
<section class="viewer"> <section class="viewer">
{#if data} {#if data}
@ -205,13 +208,7 @@
{#if tab === 'JSON'} {#if tab === 'JSON'}
<pre class="preview"> <pre class="preview">
{#if !data[0]} {#if !data[0]}
Please run your query to fetch some data. Please run your query to fetch some data.
{:else} {:else}
{JSON.stringify(data[0], undefined, 2)} {JSON.stringify(data[0], undefined, 2)}
{/if} {/if}
@ -283,12 +280,20 @@
cursor: pointer; cursor: pointer;
} }
.viewer {
min-height: 200px;
}
.preview { .preview {
width: 640px;
height: 100%; height: 100%;
min-height: 120px;
overflow-y: auto; overflow-y: auto;
overflow-wrap: break-word; overflow-wrap: break-word;
white-space: pre-wrap; white-space: pre-wrap;
background-color: var(--grey-1);
padding: var(--spacing-m);
border-radius: 8px;
color: var(--grey-6);
} }
.viewer-controls { .viewer-controls {