mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-25 14:25:02 +00:00
14 lines
449 B
TypeScript
14 lines
449 B
TypeScript
import React from 'react'
|
|
|
|
export interface FormLabelProps extends React.LabelHTMLAttributes<HTMLLabelElement> {
|
|
testId?: string
|
|
children?: React.ReactNode
|
|
required?: boolean
|
|
}
|
|
|
|
export const FormLabel: React.FC<FormLabelProps> = ({ children, required, testId, className = '', ...props }) => (
|
|
<label className={`form-label ${required ? 'form-label--required' : ''} ${className}`} data-testid={testId} {...props}>
|
|
{children}
|
|
</label>
|
|
)
|