@abgov/react-components
Version:
Government of Alberta - UI components for React
43 lines (42 loc) • 1.44 kB
TypeScript
import { GoabFormItemLabelSize, GoabFormItemRequirement, Margins } from '@abgov/ui-components-common';
import { JSX } from 'react';
interface WCProps extends Margins {
label?: string;
labelsize?: GoabFormItemLabelSize;
requirement?: GoabFormItemRequirement;
error?: string;
helptext?: string;
maxwidth?: string;
"public-form-summary-order"?: number;
name?: string;
id?: string;
testid?: string;
}
declare module "react" {
namespace JSX {
interface IntrinsicElements {
"goa-form-item": WCProps & React.HTMLAttributes<HTMLElement>;
}
}
}
export interface GoabFormItemProps extends Margins {
label?: string;
labelSize?: GoabFormItemLabelSize;
requirement?: GoabFormItemRequirement;
error?: string | React.ReactNode;
helpText?: string | React.ReactNode;
maxWidth?: string;
/**
* Public form: to arrange fields in the summary
*/
publicFormSummaryOrder?: number;
/**
* Public form: allow to override the label value within the form-summary to provide a shorter description of the value
*/
name?: string;
children?: React.ReactNode;
testId?: string;
id?: string;
}
export declare function GoabFormItem({ children, helpText, error, requirement, label, labelSize, maxWidth, publicFormSummaryOrder, name, mt, mr, mb, ml, testId, id, }: GoabFormItemProps): JSX.Element;
export default GoabFormItem;