UNPKG

@focuson/form_components

Version:

Components that can be used by @focuson/forms

22 lines (21 loc) 1.13 kB
import { RestChangeCommands, RestLoadWindowWithoutRestProps } from "@focuson/rest"; import { LensState } from "@focuson/state"; import { DateFn, RestAction, RestResult, SimpleMessage } from "@focuson/utils"; import { CommonStateProps, CustomButtonType } from "./common"; import { ConfirmWindow, ModalContext, RestLoadWindowProps } from "@focuson/pages"; export interface RestButtonProps<S, C, MSGs> extends CommonStateProps<S, any, C>, CustomButtonType { rest: string; action: RestAction; confirm?: boolean | string | ConfirmWindow; result?: RestResult; enabledBy?: string[][]; validate?: boolean; text?: string; onSuccess?: RestChangeCommands[]; on404?: RestChangeCommands[]; onComplete?: RestChangeCommands[]; dateFn?: DateFn; loader?: RestLoadWindowWithoutRestProps; } export declare function RestLoadWindow<S, C extends ModalContext<S>>(state: LensState<S, any, C>, { msg, button, rest, action, onClose, className }: RestLoadWindowProps): JSX.Element; export declare function RestButton<S, C extends ModalContext<S>>(props: RestButtonProps<S, C, SimpleMessage>): JSX.Element;