Change the errors button to an icon
This commit is contained in:
parent
52d7ab4941
commit
47a014789f
|
@ -1,7 +1,7 @@
|
||||||
<script>
|
<script lang="ts">
|
||||||
import "@spectrum-css/divider/dist/index-vars.css"
|
import "@spectrum-css/divider/dist/index-vars.css"
|
||||||
|
|
||||||
export let size = "M"
|
export let size: "S" | "M" | "L" = "M"
|
||||||
|
|
||||||
export let vertical = false
|
export let vertical = false
|
||||||
export let noMargin = false
|
export let noMargin = false
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
import { screenStore, appStore } from "@/stores/builder"
|
import { screenStore, appStore } from "@/stores/builder"
|
||||||
import UndoRedoControl from "@/components/common/UndoRedoControl.svelte"
|
import UndoRedoControl from "@/components/common/UndoRedoControl.svelte"
|
||||||
import ScreenErrorsButton from "./ScreenErrorsButton.svelte"
|
import ScreenErrorsButton from "./ScreenErrorsButton.svelte"
|
||||||
|
import { Divider } from "@budibase/bbui"
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="app-panel">
|
<div class="app-panel">
|
||||||
|
@ -16,7 +17,7 @@
|
||||||
{#if $appStore.clientFeatures.devicePreview}
|
{#if $appStore.clientFeatures.devicePreview}
|
||||||
<DevicePreviewSelect />
|
<DevicePreviewSelect />
|
||||||
{/if}
|
{/if}
|
||||||
|
<Divider vertical />
|
||||||
<ScreenErrorsButton />
|
<ScreenErrorsButton />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -65,7 +66,7 @@
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: var(--spacing-xl);
|
gap: var(--spacing-l);
|
||||||
}
|
}
|
||||||
.content {
|
.content {
|
||||||
flex: 1 1 auto;
|
flex: 1 1 auto;
|
||||||
|
|
|
@ -37,16 +37,7 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div bind:this={button} class="error-button">
|
<div bind:this={button} class="error-button">
|
||||||
<ActionButton selected quiet on:click={() => popover.show()} size="M">
|
<ActionButton quiet on:click={() => popover.show()} size="M" icon="Alert" />
|
||||||
<div class="content">
|
|
||||||
Errors
|
|
||||||
{#if $screenComponentErrorList.length}
|
|
||||||
<div class="badge">
|
|
||||||
{$screenComponentErrorList.length}
|
|
||||||
</div>
|
|
||||||
{/if}
|
|
||||||
</div>
|
|
||||||
</ActionButton>
|
|
||||||
</div>
|
</div>
|
||||||
<Popover
|
<Popover
|
||||||
bind:this={popover}
|
bind:this={popover}
|
||||||
|
@ -75,32 +66,6 @@
|
||||||
</Popover>
|
</Popover>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.error-button :global(.spectrum-ActionButton) {
|
|
||||||
border-radius: 16px;
|
|
||||||
right: -4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.error-button .content {
|
|
||||||
min-width: 50px;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
gap: 6px;
|
|
||||||
padding-left: var(--spacing-xs);
|
|
||||||
padding-right: var(--spacing-xs);
|
|
||||||
font-weight: 600;
|
|
||||||
}
|
|
||||||
.error-button .badge {
|
|
||||||
color: var(--spectrum-global-color-static-white);
|
|
||||||
background-color: var(--spectrum-global-color-static-red-700);
|
|
||||||
height: 18px;
|
|
||||||
width: 18px;
|
|
||||||
border-radius: 50%;
|
|
||||||
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
}
|
|
||||||
.error-popover {
|
.error-popover {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|
Loading…
Reference in New Issue