0026506543
- prettier's formatting has changed, so files needed to be reformatted - dart is spitting out deprecation warnings like: 254 │ 2: $spacer / 2, │ ^^^^^^^^^^^ ╵ bazel-out/darwin-fastbuild/bin/ts/sass/bootstrap/_variables.scss 254:6 @import ts/sass/button_mixins.scss 2:9 @use ts/components/ColorPicker.svelte 2:5 root stylesheet DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0. Recommendation: math.div($grid-gutter-width, 2)
50 lines
1.2 KiB
Svelte
50 lines
1.2 KiB
Svelte
<!--
|
|
Copyright: Ankitects Pty Ltd and contributors
|
|
License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|
-->
|
|
<script lang="typescript">
|
|
import { setContext } from "svelte";
|
|
import { dropdownKey } from "./contextKeys";
|
|
|
|
import WithTheming from "./WithTheming.svelte";
|
|
import ButtonToolbar from "./ButtonToolbar.svelte";
|
|
|
|
export let id: string;
|
|
let className = "";
|
|
export { className as class };
|
|
|
|
export let api: Record<string, unknown> | undefined = undefined;
|
|
|
|
setContext(dropdownKey, null);
|
|
</script>
|
|
|
|
<WithTheming style="--toolbar-wrap: nowrap; ">
|
|
<ButtonToolbar
|
|
{id}
|
|
class={`dropdown-menu btn-dropdown-menu ${className}`}
|
|
nowrap={true}
|
|
{api}
|
|
>
|
|
<slot />
|
|
</ButtonToolbar>
|
|
</WithTheming>
|
|
|
|
<style lang="scss">
|
|
:global(.dropdown-menu.btn-dropdown-menu) {
|
|
display: none;
|
|
min-width: 0;
|
|
padding: calc(var(--toolbar-size) / 10) 0;
|
|
|
|
background-color: var(--window-bg);
|
|
border-color: var(--medium-border);
|
|
|
|
:global(.btn-group) {
|
|
position: static;
|
|
}
|
|
}
|
|
|
|
:global(.dropdown-menu.btn-dropdown-menu.show) {
|
|
display: flex;
|
|
}
|
|
</style>
|