]> git.openstreetmap.org Git - nominatim-ui.git/blob - src/components/Error.svelte
Merge remote-tracking branch 'upstream/master'
[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="close" aria-label="dismiss" on:click={dismiss_message}>
18       <span aria-hidden="true">&times;</span>
19     </button>
20   </div>
21 {/if}