@kwiz/fluentui
Version:
KWIZ common controls for FluentUI
21 lines (20 loc) • 976 B
TypeScript
import { IDictionary } from "@kwiz/common";
import React, { ReactNode } from "react";
/** do not add to index - this is to be used in FormDialogEX
* we should create anotehr wrapper for forms that do not need a dialog (toolbar? save/cancel action?)
*/
interface iFormValidationContext {
errors?: IDictionary<string>;
setError?: (error: string, key?: string) => void;
showErrors?: boolean;
}
export declare const FormValidationContext: React.Context<iFormValidationContext>;
/** fields inside a FormEX component can react to validation errors */
export declare function useFormValidationContext(): iFormValidationContext;
/** Creates a form validation context, reports back if form is valid so you can enable/disable the save button */
export declare function Internal_FormEX({ children, onValid, submitError }: {
children: ReactNode;
onValid?: (isValid: boolean) => void;
submitError?: string;
}): import("react/jsx-runtime").JSX.Element;
export {};