import { cx } from '@fuel-ui/css'; import { createComponent } from '../../utils'; import type { TextProps } from '../Text'; import { Text } from '../Text'; import { useFormControlProps } from './FormControl'; import * as styles from './styles'; export type FormHelperTextProps = TextProps; type ObjProps = { id: string; }; export const FormHelperText = createComponent( ({ as = 'div', color, children, className, ...props }) => { const { id, ...parentProps } = useFormControlProps(); const classes = cx('fuel_FormHelperText', className, styles.helperText({})); const customProps = { ...props, id: `helperText${id}`, className: classes, }; return ( {children} ); }, ); FormHelperText.id = 'FormHelperText';