acud
Version:
acg react 组件库
34 lines (33 loc) • 1.02 kB
TypeScript
/**
* @file Label for FormItem
* @author chenqiang(chenqiang03)
*/
import * as React from 'react';
import type { NamePath } from 'rc-field-form/lib/interface';
import { ColProps } from '../grid/col';
import { FormLabelAlign } from './interface';
import { RequiredMark } from './Form';
import { TooltipProps } from '../tooltip';
export type WrapperTooltipProps = TooltipProps & {
icon?: React.ReactElement;
};
export type LabelTooltipType = WrapperTooltipProps | React.ReactNode;
export interface FormItemLabelProps {
colon?: boolean;
htmlFor?: string;
label?: React.ReactNode;
labelAlign?: FormLabelAlign;
labelCol?: ColProps;
labelWidth?: string | number;
requiredMark?: RequiredMark;
tooltip?: LabelTooltipType;
labelExtra?: React.ReactElement<{
name?: NamePath;
}> | React.ComponentType<any>;
}
declare const FormItemLabel: React.FC<FormItemLabelProps & {
required?: boolean;
prefixCls: string;
name?: NamePath;
}>;
export default FormItemLabel;