working on things

This commit is contained in:
stringsplit 2023-02-01 04:14:54 +00:00
parent 8769761163
commit 94c73b6dc0
3 changed files with 35 additions and 4 deletions

View file

@ -1,6 +1,8 @@
<script context="module">
import { writable } from "svelte/store";
export const pulldownOpen = writable(0);
import { allPulldowns } from "./pulldowns/Pulldown.svelte";
export const pulldownOpen = writable(false);
</script>
<script>
@ -11,8 +13,8 @@
return $pulldownOpen
}
export function openPulldown() {
pulldownOpen.set(true)
export function openPulldown(name) {
pulldownOpen.set(name)
}
export function closePulldown() {
@ -25,7 +27,9 @@
</script>
{#if $pulldownOpen}
<div class="pulldown" transition:fade={{duration:200}}>
<!-- I'm not sure how I could do this any better, so... yeah -->
</div>
<button

View file

@ -0,0 +1,7 @@
<script>
import { Pulldown } from "./Pulldown.svelte"
</script>
<Pulldown name="accounts">
</Pulldown>

View file

@ -0,0 +1,20 @@
<script context="module">
import { writable } from "svelte/store";
export const allPulldowns = writable(new Map());
</script>
<script>
import { pulldownOpen } from "../PulldownManager.svelte";
export let name;
allPulldowns
.set(name,this)
</script>
<div
class="pulldown_display"
style:display={$pulldownOpen == name ? "block" : "none"}
>
<slot />
</div>