@sheerid/jslib-nightly
Version:
SheerID JavaScript Library
19 lines (18 loc) • 895 B
TypeScript
import { default as React } from 'react';
export interface FormFieldLayoutProps {
fieldId: string;
label: React.ReactNode;
isRequired: boolean;
showPlaceholderAndHideLabel?: boolean;
errorMessage?: React.ReactNode;
children?: React.ReactNode;
explanation?: React.ReactNode;
containerId?: string;
}
export declare const getFormFieldLabelHtmlId: (fieldId: string) => string;
export declare const getFormFieldErrorHtmlId: (fieldId: string) => string;
/**
* In the JSLIB, a FormField has a label, inline error message, and children like a text input
* This component provides consistent structure, classnames and some accessibility considerations for all FormFields
*/
export declare const FormFieldLayout: ({ fieldId, label, errorMessage, isRequired, showPlaceholderAndHideLabel, children, explanation, containerId, }: FormFieldLayoutProps) => React.JSX.Element;