setting-utils

This commit is contained in:
frostime 2023-09-16 18:03:59 +08:00
parent deb065668f
commit cdb5085f35
3 changed files with 255 additions and 22 deletions

20
src/libs/index.d.ts vendored Normal file
View file

@ -0,0 +1,20 @@
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;
}
}