import React, { AllHTMLAttributes, ElementType, useState } from 'react';
import { getClassName } from '../../helpers/getClassName';
import { classNames } from '../../lib/classNames';
import { usePlatform } from '../../hooks/usePlatform';
import { HasRootRef } from '../../types';
export interface FormFieldProps extends
AllHTMLAttributes,
HasRootRef {
Component?: ElementType;
}
const FormField: React.FunctionComponent = ({
Component,
className,
children,
getRootRef,
...restProps
}: FormFieldProps) => {
const platform = usePlatform();
const [hover, setHover] = useState(false);
const handleMouseEnter = (e: MouseEvent) => {
e.stopPropagation();
setHover(true);
};
const handleMouseLeave = (e: MouseEvent) => {
e.stopPropagation();
setHover(false);
};
return (
{children}
);
};
FormField.defaultProps = {
Component: 'div',
};
export default FormField;