Settings: support disabled for boolean settings (#3876)

This commit is contained in:
nexpid 2026-01-01 02:10:42 +01:00 committed by GitHub
parent f7152a3982
commit de019f7f17
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -41,7 +41,11 @@ export function BooleanSetting({ option, pluginSettings, definedSettings, id, on
return (
<SettingsSection tag="label" name={id} description={option.description} error={error} inlineSetting>
<Switch checked={state} onChange={handleChange} />
<Switch
checked={state}
onChange={handleChange}
disabled={option.disabled?.call(definedSettings) ?? false}
/>
</SettingsSection>
);
}