/* Copyright 2025 New Vector Ltd. Copyright 2023 The Matrix.org Foundation C.I.C. SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial Please see LICENSE files in the repository root for full details. */ import React from "react"; import { Typography } from "./Typography"; import { Text } from "./Text"; type TypographyProps = React.ComponentProps; /** * A heading component. */ export const Heading: React.FC< Omit & { // xs is not a valid heading size size?: Exclude; } > = ({ as = "h1", children, ...props }) => { return ( {children} ); }; type HeadingProps = Omit< React.ComponentProps, "as" | "weight" | "size" >; /** * A Heading level-1 styled component. Underlying HTML element can be changed * usign the `as` property. */ export const H1: React.FC = ({ children, ...props }) => { return ( {children} ); }; /** * A Heading level-2 styled component. Underlying HTML element can be changed * usign the `as` property. */ export const H2: React.FC = ({ children, ...props }) => { return ( {children} ); }; /** * A Heading level-3 styled component. Underlying HTML element can be changed * usign the `as` property. */ export const H3: React.FC = ({ children, ...props }) => { return ( {children} ); }; /** * A Heading level-4 styled component. Underlying HTML element can be changed * usign the `as` property. */ export const H4: React.FC = ({ children, ...props }) => { return ( {children} ); }; /** * A Heading level-5 styled component. Underlying HTML element can be changed * usign the `as` property. */ export const H5: React.FC = ({ children, ...props }) => { return ( {children} ); }; /** * A Heading level-6 styled component. Underlying HTML element can be changed * usign the `as` property. */ export const H6: React.FC = ({ children, ...props }) => { return ( {children} ); };