Fix settings header
This commit is contained in:
parent
b016cf59e9
commit
3ac8d2773d
4 changed files with 3 additions and 11 deletions
Binary file not shown.
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 51 KiB |
Binary file not shown.
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 62 KiB |
|
@ -45,7 +45,7 @@ export const SettingsSubsection: React.FC<SettingsSubsectionProps> = ({
|
||||||
mx_SettingsSubsection_newUi: !legacy,
|
mx_SettingsSubsection_newUi: !legacy,
|
||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
{typeof heading === "string" ? <SettingsSubsectionHeading heading={heading} legacy={legacy} /> : <>{heading}</>}
|
{typeof heading === "string" ? <SettingsSubsectionHeading heading={heading} /> : <>{heading}</>}
|
||||||
{!!description && (
|
{!!description && (
|
||||||
<div className="mx_SettingsSubsection_description">
|
<div className="mx_SettingsSubsection_description">
|
||||||
<SettingsSubsectionText>{description}</SettingsSubsectionText>
|
<SettingsSubsectionText>{description}</SettingsSubsectionText>
|
||||||
|
|
|
@ -12,21 +12,13 @@ import Heading from "../../typography/Heading";
|
||||||
|
|
||||||
export interface SettingsSubsectionHeadingProps extends HTMLAttributes<HTMLDivElement> {
|
export interface SettingsSubsectionHeadingProps extends HTMLAttributes<HTMLDivElement> {
|
||||||
heading: string;
|
heading: string;
|
||||||
legacy?: boolean;
|
|
||||||
children?: React.ReactNode;
|
children?: React.ReactNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const SettingsSubsectionHeading: React.FC<SettingsSubsectionHeadingProps> = ({
|
export const SettingsSubsectionHeading: React.FC<SettingsSubsectionHeadingProps> = ({ heading, children, ...rest }) => {
|
||||||
heading,
|
|
||||||
legacy = true,
|
|
||||||
children,
|
|
||||||
...rest
|
|
||||||
}) => {
|
|
||||||
const size = legacy ? "4" : "3";
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div {...rest} className="mx_SettingsSubsectionHeading">
|
<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}
|
||||||
</Heading>
|
</Heading>
|
||||||
{children}
|
{children}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue