Updating the tooltip button to have an info icon like the labels on the right instead.
This commit is contained in:
parent
d13985af3f
commit
6199f06ea9
|
@ -45,6 +45,18 @@
|
|||
{#if $$slots}
|
||||
<span class="spectrum-Button-label"><slot /></span>
|
||||
{/if}
|
||||
{#if !disabled && tooltip}
|
||||
<div class="tooltip-icon">
|
||||
<svg
|
||||
class="spectrum-Icon spectrum-Icon--size{size.toUpperCase()}"
|
||||
focusable="false"
|
||||
aria-hidden="true"
|
||||
aria-label="Info"
|
||||
>
|
||||
<use xlink:href="#spectrum-icon-18-InfoOutline" />
|
||||
</svg>
|
||||
</div>
|
||||
{/if}
|
||||
</button>
|
||||
{#if showTooltip && tooltip}
|
||||
<div class="position">
|
||||
|
@ -84,4 +96,8 @@
|
|||
width: 0;
|
||||
height: 0;
|
||||
}
|
||||
.tooltip-icon {
|
||||
padding-left: var(--spacing-m);
|
||||
line-height: 0;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -59,7 +59,9 @@
|
|||
$: schemaReadOnly = !responseSuccess
|
||||
$: variablesReadOnly = !responseSuccess
|
||||
$: showVariablesTab = shouldShowVariables(dynamicVariables, variablesReadOnly)
|
||||
$: hasSchema = !!query?.schema
|
||||
$: hasSchema =
|
||||
Object.keys(schema || {}).length !== 0 ||
|
||||
Object.keys(query?.schema || {}).length !== 0
|
||||
|
||||
function getSelectedQuery() {
|
||||
return cloneDeep(
|
||||
|
@ -318,10 +320,8 @@
|
|||
<Button primary disabled={!url} on:click={runQuery}>Send</Button>
|
||||
<Button
|
||||
disabled={!query.name}
|
||||
cta={hasSchema}
|
||||
warning={!hasSchema}
|
||||
cta
|
||||
on:click={saveQuery}
|
||||
icon={!hasSchema && query.name ? "Alert" : null}
|
||||
tooltip={!hasSchema
|
||||
? "Saving a query before sending will mean no schema is generated"
|
||||
: null}>Save</Button
|
||||
|
|
Loading…
Reference in New Issue