Make search global: modal opened from sidebar, mobile menu and / key
This commit is contained in:
parent
d67b789f28
commit
950bdf1925
7 changed files with 290 additions and 234 deletions
15
src/lib/searchModal.svelte.ts
Normal file
15
src/lib/searchModal.svelte.ts
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
let open = $state(false);
|
||||
|
||||
export const searchModal = {
|
||||
get open() {
|
||||
return open;
|
||||
},
|
||||
};
|
||||
|
||||
export function openSearch() {
|
||||
open = true;
|
||||
}
|
||||
|
||||
export function closeSearch() {
|
||||
open = false;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue