Fix font & spaces in settings subsection (#28631)

* Fix settings header

* Fix gap between subsection

* Update tests

* Update e2e tests

* Update snapshots
This commit is contained in:
Florian Duros 2024-12-04 15:11:02 +01:00 committed by GitHub
parent db5b3359c6
commit 5a418f3f19
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 19 additions and 18 deletions

View file

@ -45,7 +45,7 @@ export const SettingsSubsection: React.FC<SettingsSubsectionProps> = ({
mx_SettingsSubsection_newUi: !legacy,
})}
>
{typeof heading === "string" ? <SettingsSubsectionHeading heading={heading} legacy={legacy} /> : <>{heading}</>}
{typeof heading === "string" ? <SettingsSubsectionHeading heading={heading} /> : <>{heading}</>}
{!!description && (
<div className="mx_SettingsSubsection_description">
<SettingsSubsectionText>{description}</SettingsSubsectionText>

View file

@ -12,21 +12,13 @@ import Heading from "../../typography/Heading";
export interface SettingsSubsectionHeadingProps extends HTMLAttributes<HTMLDivElement> {
heading: string;
legacy?: boolean;
children?: React.ReactNode;
}
export const SettingsSubsectionHeading: React.FC<SettingsSubsectionHeadingProps> = ({
heading,
legacy = true,
children,
...rest
}) => {
const size = legacy ? "4" : "3";
export const SettingsSubsectionHeading: React.FC<SettingsSubsectionHeadingProps> = ({ heading, children, ...rest }) => {
return (
<div {...rest} className="mx_SettingsSubsectionHeading">
<Heading className="mx_SettingsSubsectionHeading_heading" size={size} as="h3">
<Heading className="mx_SettingsSubsectionHeading_heading" size="4" as="h3">
{heading}
</Heading>
{children}