diff options
Diffstat (limited to 'src/components/options/ToggleOptionComponent.tsx')
-rw-r--r-- | src/components/options/ToggleOptionComponent.tsx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/components/options/ToggleOptionComponent.tsx b/src/components/options/ToggleOptionComponent.tsx index b67024f4..c6ea698d 100644 --- a/src/components/options/ToggleOptionComponent.tsx +++ b/src/components/options/ToggleOptionComponent.tsx @@ -5,6 +5,7 @@ import Config from "../../config"; export interface ToggleOptionProps { configKey: string; label: string; + disabled?: boolean; } export interface ToggleOptionState { @@ -27,7 +28,11 @@ class ToggleOptionComponent extends React.Component<ToggleOptionProps, ToggleOpt <div> <div className="switch-container"> <label className="switch"> - <input id={this.props.configKey} type="checkbox" checked={this.state.enabled} onChange={(e) => this.clicked(e)}/> + <input id={this.props.configKey} + type="checkbox" + checked={this.state.enabled} + disabled={this.props.disabled} + onChange={(e) => this.clicked(e)}/> <span className="slider round"></span> </label> <label className="switch-label" htmlFor={this.props.configKey}> |