UNPKG

@oceanbase/design

Version:
26 lines (25 loc) 1.03 kB
import React from 'react'; import type { ReactNode } from 'react'; import type { FormItemProps as AntFormItemProps } from 'antd/es/form'; import type { TooltipProps } from '../tooltip'; declare const AntFormItem: (<Values = any>(props: AntFormItemProps<Values>) => React.ReactElement<any, string | React.JSXElementConstructor<any>>) & { useStatus: () => { status?: "" | "error" | "warning" | "success" | "validating"; errors: React.ReactNode[]; warnings: React.ReactNode[]; }; }; export * from 'antd/es/form/FormItem'; export type WrapperTooltipProps = Omit<TooltipProps, 'mouseFollow'> & { icon?: React.ReactElement; }; export type LabelTooltipType = WrapperTooltipProps | React.ReactNode; export interface FormItemProps extends AntFormItemProps { tooltip?: WrapperTooltipProps | ReactNode; action?: ReactNode; } type CompoundedComponent = React.FC<FormItemProps> & { useStatus: typeof AntFormItem.useStatus; }; declare const FormItem: CompoundedComponent; export default FormItem;