anki/ts/components/DropdownMenu.svelte

24 lines
522 B
Svelte
Raw Normal View History

2021-04-15 15:59:52 +02:00
<!--
Copyright: Ankitects Pty Ltd and contributors
License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
-->
<script lang="typescript">
2021-04-28 22:15:24 +02:00
import { setContext } from "svelte";
import { dropdownKey } from "./contextKeys";
2021-04-28 22:15:24 +02:00
export let id: string | undefined;
setContext(dropdownKey, null);
</script>
<style lang="scss">
2021-04-28 22:15:24 +02:00
div {
background-color: var(--frame-bg);
border-color: var(--medium-border);
}
</style>
2021-05-06 03:37:21 +02:00
<div {id} class="dropdown-menu">
2021-04-28 22:15:24 +02:00
<slot />
</div>