mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-27 07:08:11 +08:00
fix: use apt PopoverButton types
This commit is contained in:
@@ -1,11 +1,11 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import type { IconName } from "@graphite/utility-functions/icons";
|
import type { IconName } from "@graphite/utility-functions/icons";
|
||||||
// import { LayoutGroup, WidgetLayout } from "~src/wasm-communication/messages";
|
|
||||||
|
|
||||||
import FloatingMenu from "@graphite/components/layout/FloatingMenu.svelte";
|
import FloatingMenu from "@graphite/components/layout/FloatingMenu.svelte";
|
||||||
import LayoutRow from "@graphite/components/layout/LayoutRow.svelte";
|
import LayoutRow from "@graphite/components/layout/LayoutRow.svelte";
|
||||||
import IconButton from "@graphite/components/widgets/buttons/IconButton.svelte";
|
import IconButton from "@graphite/components/widgets/buttons/IconButton.svelte";
|
||||||
import WidgetLayout from "../WidgetLayout.svelte";
|
import { WidgetLayout } from "~src/wasm-communication/messages";
|
||||||
|
// import WidgetLayout from "../WidgetLayout.svelte";
|
||||||
|
|
||||||
|
|
||||||
export let icon: IconName = "DropdownArrow";
|
export let icon: IconName = "DropdownArrow";
|
||||||
export let tooltip: string | undefined = undefined;
|
export let tooltip: string | undefined = undefined;
|
||||||
@@ -22,7 +22,6 @@
|
|||||||
open = true;
|
open = true;
|
||||||
action?.();
|
action?.();
|
||||||
}
|
}
|
||||||
// console.log(optionsWidget, layoutTarget);
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<LayoutRow class="popover-button">
|
<LayoutRow class="popover-button">
|
||||||
@@ -30,7 +29,7 @@
|
|||||||
<IconButton classes={{ open }} {disabled} action={() => onClick()} icon={icon || "DropdownArrow"} size={16} {tooltip} data-floating-menu-spawner />
|
<IconButton classes={{ open }} {disabled} action={() => onClick()} icon={icon || "DropdownArrow"} size={16} {tooltip} data-floating-menu-spawner />
|
||||||
|
|
||||||
{:else}
|
{:else}
|
||||||
<IconButton classes={{ open }} {disabled} action={() => onClick()} icon={icon || "DropdownArrow"} size={16} options_widget={optionsWidget} data-floating-menu-spawner />
|
<IconButton classes={{ open }} {disabled} action={() => onClick()} icon={icon || "DropdownArrow"} size={16} options_widget={optionsWidget} layoutTarget={layoutTarget} data-floating-menu-spawner />
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<FloatingMenu {open} on:open={({ detail }) => (open = detail)} type="Popover" direction="Bottom">
|
<FloatingMenu {open} on:open={({ detail }) => (open = detail)} type="Popover" direction="Bottom">
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import { Transform, Type, plainToClass } from "class-transformer";
|
|||||||
|
|
||||||
import { type IconName, type IconSize } from "@graphite/utility-functions/icons";
|
import { type IconName, type IconSize } from "@graphite/utility-functions/icons";
|
||||||
import { type WasmEditorInstance, type WasmRawInstance } from "@graphite/wasm-communication/editor";
|
import { type WasmEditorInstance, type WasmRawInstance } from "@graphite/wasm-communication/editor";
|
||||||
import WidgetLayout from "~src/components/widgets/WidgetLayout.svelte";
|
|
||||||
|
|
||||||
export class JsMessage {
|
export class JsMessage {
|
||||||
// The marker provides a way to check if an object is a sub-class constructor for a jsMessage.
|
// The marker provides a way to check if an object is a sub-class constructor for a jsMessage.
|
||||||
|
|||||||
Reference in New Issue
Block a user