]> git.openstreetmap.org Git - nominatim-ui.git/blob - src/components/Error.svelte
npm updates. All but svelte
[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"
18             class="btn-close float-end"
19             aria-label="dismiss"
20             on:click={dismiss_message}></button>
21   </div>
22 {/if}