Make Option.Component not require description

Also correctly infers the type from "default"
This commit is contained in:
Nuckyz 2025-01-29 14:34:44 -03:00
parent a2213d4feb
commit 5ad35c36e4
No known key found for this signature in database
GPG key ID: 440BF8296E1C4AD9
10 changed files with 26 additions and 28 deletions

View file

@ -147,8 +147,7 @@ function IdsListComponent(props: { setValue: (value: string) => void; }) {
const settings = definePluginSettings({
importCustomRPC: {
type: OptionType.COMPONENT,
description: "",
component: () => <ImportCustomRPCComponent />
component: ImportCustomRPCComponent
},
listMode: {
type: OptionType.SELECT,
@ -168,7 +167,6 @@ const settings = definePluginSettings({
},
idsList: {
type: OptionType.COMPONENT,
description: "",
default: "",
onChange(newValue: string) {
const ids = new Set(newValue.split(",").map(id => id.trim()).filter(Boolean));