import React from 'react'; import PropTypes from 'prop-types'; import { TypographyTitleVariant } from '@splunk/themes/mixins'; import { StyledTypography } from './HeadingStyles'; import { ComponentProps } from '../utils/types'; interface HeadingPropsBase { children: React.ReactNode; /** * A React ref which is set to the DOM element when the component mounts and null when it unmounts. */ elementRef?: React.Ref; /** * Corresponds to the respective `` HTML tags and `typography(titleX)` `@splunk/themes` typography variant. * Styles will be set corresponding to level if variant is not provided: e.g. `level=3` will default to using `title3` from `mixins`. */ level: 1 | 2 | 3 | 4 | 5 | 6; /** * Styles the component based on typography mixin title preset styles. * If a variant is not provided, styles will be set corresponding to level: e.g. `level=3` will default to using `title3` from `mixins`. */ variant?: TypographyTitleVariant; } type HeadingProps = ComponentProps; declare const levelToElement: Record; declare function Heading({ level, elementRef, children, variant, ...otherProps }: HeadingProps): React.JSX.Element; declare namespace Heading { var propTypes: { children: PropTypes.Validator>; elementRef: PropTypes.Requireable; level: PropTypes.Validator; variant: PropTypes.Requireable; }; } export default Heading; export { levelToElement, StyledTypography as StyledHeading };