mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-25 22:34:56 +00:00
14 lines
446 B
TypeScript
14 lines
446 B
TypeScript
import React from 'react'
|
|
|
|
export interface FormHelperTextProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
testId?: string
|
|
children?: React.ReactNode
|
|
error?: boolean
|
|
}
|
|
|
|
export const FormHelperText: React.FC<FormHelperTextProps> = ({ children, error, testId, className = '', ...props }) => (
|
|
<span className={`form-helper ${error ? 'form-helper--error' : ''} ${className}`} data-testid={testId} {...props}>
|
|
{children}
|
|
</span>
|
|
)
|