budibase/packages/builder/src/common/ErrorsBox.svelte

19 lines
280 B
Svelte
Raw Normal View History

2019-07-13 11:35:57 +02:00
<script>
2020-02-03 10:50:30 +01:00
export let errors = []
2019-07-13 11:35:57 +02:00
2020-02-03 10:50:30 +01:00
$: hasErrors = errors.length > 0
2019-07-13 11:35:57 +02:00
</script>
{#if hasErrors}
<div uk-alert class="uk-alert-danger">
2019-07-13 11:35:57 +02:00
{#each errors as error}
<div>
2020-02-03 10:50:30 +01:00
{error.field ? `${error.field}: ` : ''}{error.error}
</div>
2019-07-13 11:35:57 +02:00
{/each}
</div>
2019-07-13 11:35:57 +02:00
{/if}
2019-07-13 11:35:57 +02:00