@focuson/form_components
Version:
Components that can be used by @focuson/forms
20 lines (19 loc) • 864 B
TypeScript
import { LensProps, LensState } from "@focuson/state";
import { NameAnd, PageMode } from "@focuson/utils";
import { HasButtons } from "./makeButtons";
export interface SelectedItemDisplayProps<S, T, Context> {
state: LensState<S, T, Context>;
mode: PageMode;
id: string;
allButtons: NameAnd<JSX.Element>;
}
export interface SelectedItemProps<FS, S, T, Context> extends LensProps<S, T[], Context>, HasButtons {
id: string;
index: number | undefined;
mode: PageMode;
header?: string;
showNofM?: boolean;
headerIfEmpty?: string;
display: (props: SelectedItemDisplayProps<S, T, Context>) => JSX.Element;
}
export declare function SelectedItem<FS, S, T, Context>({ index, state, display, mode, id, allButtons, header, showNofM, headerIfEmpty }: SelectedItemProps<FS, S, T, Context>): import("react/jsx-runtime").JSX.Element;