FormItemLayout.tsx21 lines · main
| 1 | import { ElementRef, forwardRef } from 'react' |
| 2 | import { FormItem } from 'ui' |
| 3 | |
| 4 | import { FormLayout } from '../Layout/FormLayout' |
| 5 | |
| 6 | const FormItemLayout = forwardRef< |
| 7 | ElementRef<typeof FormLayout>, |
| 8 | React.ComponentPropsWithoutRef<typeof FormLayout> // Use any as placeholder types |
| 9 | >(({ ...props }, ref) => { |
| 10 | return ( |
| 11 | <FormItem> |
| 12 | <FormLayout ref={ref} isReactForm {...props}> |
| 13 | {props.children} |
| 14 | </FormLayout> |
| 15 | </FormItem> |
| 16 | ) |
| 17 | }) |
| 18 | |
| 19 | FormItemLayout.displayName = 'FormItemLayout' |
| 20 | |
| 21 | export { FormItemLayout } |