import React from 'react';
import { Text as RNText, type TextProps as RNTextProps } from 'react-native';
import { useTextComponent } from '../../providers/text-component/provider';
import { cn } from '../theme';
/**
* Props for HeroText component
*/
export interface HeroTextProps extends RNTextProps {
/**
* Additional CSS classes that will be merged with the default 'font-normal' class
*/
className?: string;
}
/**
* HeroText component that automatically applies global text configuration
* from HeroUINativeProvider.
*
* This component is distinct from React Native's Text component and includes
* a default 'font-normal' className that can be extended via the className prop.
*
* Global text props that can be configured:
* - adjustsFontSizeToFit: Auto-scale text to fit constraints
* - allowFontScaling: Respect Text Size accessibility settings
* - maxFontSizeMultiplier: Maximum font scale when allowFontScaling is enabled
* - minimumFontScale: Minimum scale when adjustsFontSizeToFit is enabled (iOS only)
*
* @example
* ```tsx
* Hello World
* ```
*
* @example
* With custom className:
* ```tsx
* Hello World
* ```
*
* @example
* Global configuration in HeroUINativeProvider:
* ```tsx
*
*
*
* ```
*/
export const HeroText = React.forwardRef(
(props, ref) => {
const { className, ...restProps } = props;
const { textProps } = useTextComponent();
const mergedProps = Object.assign({}, textProps, restProps);
return (
);
}
);
HeroText.displayName = 'HeroText';