mirror of
https://github.com/mollersuite/monofile.git
synced 2024-11-21 21:36:26 -08:00
working on things
This commit is contained in:
parent
8769761163
commit
94c73b6dc0
|
@ -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,6 +27,8 @@
|
|||
</script>
|
||||
{#if $pulldownOpen}
|
||||
<div class="pulldown" transition:fade={{duration:200}}>
|
||||
<!-- I'm not sure how I could do this any better, so... yeah -->
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
|
7
src/svelte/elem/pulldowns/Accounts.svelte
Normal file
7
src/svelte/elem/pulldowns/Accounts.svelte
Normal file
|
@ -0,0 +1,7 @@
|
|||
<script>
|
||||
import { Pulldown } from "./Pulldown.svelte"
|
||||
</script>
|
||||
|
||||
<Pulldown name="accounts">
|
||||
|
||||
</Pulldown>
|
20
src/svelte/elem/pulldowns/Pulldown.svelte
Normal file
20
src/svelte/elem/pulldowns/Pulldown.svelte
Normal 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>
|
Loading…
Reference in a new issue