Implement the Security & Privacy tab of new room settings

This commit is contained in:
Travis Ralston 2019-01-29 14:30:53 -07:00
parent 0cce912cf6
commit a2f516c461
7 changed files with 345 additions and 19 deletions

View file

@ -28,6 +28,9 @@ export default class LabelledToggleSwitch extends React.Component {
// The translated label for the switch
label: PropTypes.string.isRequired,
// Whether or not to disable the toggle switch
disabled: PropTypes.bool,
};
render() {
@ -35,7 +38,8 @@ export default class LabelledToggleSwitch extends React.Component {
return (
<div className="mx_SettingsFlag">
<span className="mx_SettingsFlag_label">{this.props.label}</span>
<ToggleSwitch checked={this.props.value} onChange={this.props.onChange} />
<ToggleSwitch checked={this.props.value} disabled={this.props.disabled}
onChange={this.props.onChange} />
</div>
);
}