jamis
Version:
一种支持通过JSON配置方式生成页面的组件库
48 lines (47 loc) • 1.54 kB
TypeScript
import React from 'react';
import type { ThemeProps } from 'jamis-core';
import type { SizeUnit } from '../types';
export interface PickerContainerProps extends ThemeProps {
title?: string;
showTitle?: boolean;
showFooter?: boolean;
headerClassName?: string;
children: (props: {
onClick: (e: React.MouseEvent) => void;
setState: (state: any) => void;
isOpened: boolean;
}) => JSX.Element;
bodyRender: (props: {
onClose: () => void;
value: any;
onChange: (value: any) => void;
setState: (state: any) => void;
[propName: string]: any;
}) => JSX.Element | null;
value?: any;
beforeConfirm?: (bodyRef: any) => any;
onConfirm?: (value?: any) => void;
onCancel?: () => void;
popOverContainer?: any;
popOverClassName?: string;
size?: SizeUnit;
onFocus?: () => void;
onClose?: () => void;
onPickerOpen?: (props: PickerContainerProps) => any;
}
export interface PickerContainerState {
isOpened: boolean;
value?: any;
}
export declare class PickerContainer extends React.Component<PickerContainerProps, PickerContainerState> {
state: PickerContainerState;
bodyRef: React.RefObject<any>;
componentDidUpdate(prevProps: PickerContainerProps): void;
handleClick(): Promise<void>;
close(e?: any, callback?: () => void): void;
handleChange(value: any): void;
confirm(): Promise<void>;
updateState(state?: any): void;
render(): JSX.Element;
}
export default PickerContainer;