import React, { forwardRef, memo } from 'react'; import { headingStyle } from './styles'; import type { VariantProps } from '@gluestack-ui/nativewind-utils'; type IHeadingProps = VariantProps & React.ComponentPropsWithoutRef<'h1'> & { as?: React.ElementType; }; const MappedHeading = memo( forwardRef( ( { size, className, isTruncated, bold, underline, strikeThrough, sub, italic, highlight, ...props }, ref ) => { switch (size) { case '5xl': case '4xl': case '3xl': return (

); case '2xl': return (

); case 'xl': return (

); case 'lg': return (

); case 'md': return (

); case 'sm': case 'xs': return (
); default: return (

); } } ) ); const Heading = memo( forwardRef( ({ className, size = 'lg', as: AsComp, ...props }, ref) => { const { isTruncated, bold, underline, strikeThrough, sub, italic, highlight, } = props; if (AsComp) { return ( ); } return ( ); } ) ); Heading.displayName = 'Heading'; export { Heading };