]> git.openstreetmap.org Git - nominatim-ui.git/blob - src/components/Error.svelte
new config option -Reverse_Only- (#166)
[nominatim-ui.git] / src / components / Error.svelte
1 <script>
2   import { error_store } from '../lib/stores.js';
3
4   let error_message;
5
6   error_store.subscribe(text => { error_message = text; });
7
8   function dismiss_message() {
9     error_store.set(null);
10   }
11 </script>
12
13 {#if error_message}
14   <div id="error" class="container-fluid alert-danger py-3 px-4">
15     {error_message}
16
17     <button type="button" class="btn-close float-end" aria-label="dismiss" on:click={dismiss_message}></button>
18   </div>
19 {/if}