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

Add margins between labs sections #8169

Merged
merged 1 commit into from
Mar 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions res/css/views/settings/tabs/user/_LabsUserSettingsTab.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@ limitations under the License.
*/

.mx_LabsUserSettingsTab {
.mx_SettingsTab_section {
margin-top: 32px;
.mx_SettingsTab_subsectionText, .mx_SettingsTab_section {
margin-bottom: 30px;
}

.mx_SettingsFlag {
margin-right: 0; // remove right margin to align with beta cards
display: flex;
align-items: center;
justify-content: space-between;
.mx_SettingsTab_section .mx_SettingsFlag {
margin-right: 0; // remove right margin to align with beta cards
display: flex;
align-items: center;
justify-content: space-between;

.mx_ToggleSwitch {
float: unset;
}
.mx_ToggleSwitch {
float: unset;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export default class LabsUserSettingsTab extends React.Component<{}, IState> {
</div>;
}

let labsSection;
let labsSections;
if (SdkConfig.get("show_labs_settings")) {
const groups = new EnhancedMap<LabGroup, JSX.Element[]>();
labs.forEach(f => {
Expand Down Expand Up @@ -143,14 +143,14 @@ export default class LabsUserSettingsTab extends React.Component<{}, IState> {
);
}

labsSection = <div className="mx_SettingsTab_section">
labsSections = <>
{ sortBy(Array.from(groups.entries()), "0").map(([group, flags]) => (
<div key={group}>
<div className="mx_SettingsTab_section" key={group}>
<span className="mx_SettingsTab_subheading">{ _t(labGroupNames[group]) }</span>
{ flags }
</div>
)) }
</div>;
</>;
}

return (
Expand All @@ -172,7 +172,7 @@ export default class LabsUserSettingsTab extends React.Component<{}, IState> {
}
</div>
{ betaSection }
{ labsSection }
{ labsSections }
</div>
);
}
Expand Down