Use semantic headings in user settings - Notifications (#10948)

* use semantic headings in user notif settings

* unset margin for subsection content when no heading

* remove debug
This commit is contained in:
Kerry 2023-05-24 11:36:09 +12:00 committed by GitHub
parent f491f2f951
commit 9211da20f4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 81 additions and 85 deletions

View file

@ -20,7 +20,7 @@ import React, { HTMLAttributes } from "react";
import { SettingsSubsectionHeading } from "./SettingsSubsectionHeading";
export interface SettingsSubsectionProps extends HTMLAttributes<HTMLDivElement> {
heading: string | React.ReactNode;
heading?: string | React.ReactNode;
description?: string | React.ReactNode;
children?: React.ReactNode;
// when true content will be justify-items: stretch, which will make items within the section stretch to full width.
@ -50,6 +50,7 @@ export const SettingsSubsection: React.FC<SettingsSubsectionProps> = ({
<div
className={classNames("mx_SettingsSubsection_content", {
mx_SettingsSubsection_contentStretch: !!stretchContent,
mx_SettingsSubsection_noHeading: !heading && !description,
})}
>
{children}