'use client' import type { FC } from 'react' import React from 'react' import Input from './input' import cn from '@/utils/classnames' import Tooltip from '@/app/components/base/tooltip' type Props = { className?: string label: string labelClassName?: string value: string | number onChange: (value: string | number) => void isRequired?: boolean placeholder?: string isNumber?: boolean tooltip?: string } const Field: FC = ({ className, label, labelClassName, value, onChange, isRequired = false, placeholder = '', isNumber = false, tooltip, }) => { return (
{label}
{isRequired && *} {tooltip && ( {tooltip}
} triggerClassName='ml-0.5 w-4 h-4' /> )}
) } export default React.memo(Field)