@worktif/purei
Version:
Work TIF Material UI Theme Provider and Customization Suite for React applications with dark mode support and dynamic color schemes
24 lines (23 loc) • 1.1 kB
TypeScript
import { Maybe } from '../types';
/**
* A default label string used for internationalized form fields.
* This string serves as a fallback label to guide users
* when customized field-specific labels might not be provided
* or when internationalization support is lacking.
*
* The purpose of this constant is to indicate that the administrator
* should provide assistance in understanding or filling out the field.
*
* @constant {string} DEFAULT_I18N_FORM_FIELD_LABEL
*/
export declare const DEFAULT_I18N_FORM_FIELD_LABEL = "Administrator Should Help You";
/**
* Retrieves the label for a form field based on a given internationalization schema and field key.
*
* @param {any} i18nSchema - The internationalization schema object containing field labels.
* @param {string} fieldKey - The key corresponding to the desired form field label within the schema.
* @return {string} The label for the specified form field, or a default message if the key is not found.
*/
export declare function getFormFieldLabel(i18nSchema: Maybe<{
[i18nKey: string]: string;
}>, fieldKey: string): string;