plugin-sample-vite-svelte/src/libs/index.d.ts
2023-09-16 18:03:59 +08:00

20 lines
456 B
TypeScript

type TSettingItemType = "checkbox" | "select" | "textinput" | "textarea" | "slider" | "button";
interface ISettingItem {
key: string;
value: any;
type: TSettingItemType;
title: string;
description?: string;
slider?: {
min: number;
max: number;
step: number;
};
select?: {
options: {val: any; text: string}[];
};
button?: {
label: string;
callback: () => void;
}
}