Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 2329571

Browse files
authored
Position toggle switch more clearly (#6914)
* Position toggle switch more clearly * attempt to revert changes, align switch to title instead * remove unused import, add missing property Co-authored-by: ColonisationCaptain <[email protected]>
1 parent 01c4d3e commit 2329571

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

res/css/views/settings/_SetIntegrationManager.scss

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,11 @@ limitations under the License.
2626
.mx_SetIntegrationManager > .mx_SettingsTab_heading > .mx_SettingsTab_subheading {
2727
display: inline-block;
2828
padding-left: 5px;
29+
margin-top: 0px;
2930
}
3031

3132
.mx_SetIntegrationManager .mx_ToggleSwitch {
3233
display: inline-block;
3334
float: right;
3435
top: 9px;
35-
36-
@mixin mx_Settings_fullWidthField;
3736
}

src/components/views/settings/SetIntegrationManager.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ import React from 'react';
1818
import { _t } from "../../../languageHandler";
1919
import { IntegrationManagers } from "../../../integrations/IntegrationManagers";
2020
import { IntegrationManagerInstance } from "../../../integrations/IntegrationManagerInstance";
21-
import * as sdk from '../../../index';
2221
import SettingsStore from "../../../settings/SettingsStore";
2322
import { SettingLevel } from "../../../settings/SettingLevel";
2423
import { replaceableComponent } from "../../../utils/replaceableComponent";
24+
import ToggleSwitch from "../elements/ToggleSwitch";
2525

2626
import { logger } from "matrix-js-sdk/src/logger";
2727

@@ -59,8 +59,6 @@ export default class SetIntegrationManager extends React.Component<IProps, IStat
5959
};
6060

6161
public render(): React.ReactNode {
62-
const ToggleSwitch = sdk.getComponent("views.elements.ToggleSwitch");
63-
6462
const currentManager = this.state.currentManager;
6563
let managerName;
6664
let bodyText;
@@ -81,7 +79,11 @@ export default class SetIntegrationManager extends React.Component<IProps, IStat
8179
<div className="mx_SettingsTab_heading">
8280
<span>{ _t("Manage integrations") }</span>
8381
<span className="mx_SettingsTab_subheading">{ managerName }</span>
84-
<ToggleSwitch checked={this.state.provisioningEnabled} onChange={this.onProvisioningToggled} />
82+
<ToggleSwitch
83+
checked={this.state.provisioningEnabled}
84+
disabled={false}
85+
onChange={this.onProvisioningToggled}
86+
/>
8587
</div>
8688
<span className="mx_SettingsTab_subsectionText">
8789
{ bodyText }

0 commit comments

Comments
 (0)