diff --git a/src/components/PluginSettings/components/SettingBooleanComponent.tsx b/src/components/PluginSettings/components/SettingBooleanComponent.tsx index c90af168..e5219e45 100644 --- a/src/components/PluginSettings/components/SettingBooleanComponent.tsx +++ b/src/components/PluginSettings/components/SettingBooleanComponent.tsx @@ -16,8 +16,9 @@ * along with this program. If not, see . */ +import { wordsFromCamel, wordsToTitle } from "@utils/text"; import { PluginOptionBoolean } from "@utils/types"; -import { Forms, React, Select } from "@webpack/common"; +import { Forms, React, Switch } from "@webpack/common"; import { ISettingElementProps } from "."; @@ -31,11 +32,6 @@ export function SettingBooleanComponent({ option, pluginSettings, definedSetting onError(error !== null); }, [error]); - const options = [ - { label: "Enabled", value: true, default: def === true }, - { label: "Disabled", value: false, default: typeof def === "undefined" || def === false }, - ]; - function handleChange(newValue: boolean): void { const isValid = option.isValid?.call(definedSettings, newValue) ?? true; if (typeof isValid === "string") setError(isValid); @@ -49,18 +45,17 @@ export function SettingBooleanComponent({ option, pluginSettings, definedSetting return ( - {option.description} -