import React, { ReactNode, ReactElement } from "react"; export interface ActionSheetOption { text: ReactNode; value: string | number; [key: string]: any; } export declare type ActionValue = string | ActionSheetOption; export interface ActionProps { visible?: boolean; title?: ReactNode; data: T[]; defaultValue?: T; className?: string; style?: React.CSSProperties; onConfirm?: (selectedValue: T, index: number) => void; onCancel?: (bottom?: boolean) => void; onClose?: () => void; onClick?: (flag: boolean) => void; children?: ReactNode; description?: ReactNode; /** * @summary controlled模式下,组件为受控组件,需要外部来显示和隐藏 * @description submit 模式下会显示提交按钮,可以自定义,也可以显示取消按钮但是得传进来一个Toggle事件用来显示隐藏 */ mode?: "controlled"; cancelText?: ReactNode; /** * submit模式下,默认不展示取消按钮,可以设置 */ showCancel?: boolean; submitText?: string; renderItem?: (item: T, index: number) => ReactNode; ItemWrapper?: React.FC<{}>; onSubmit?: () => void; justifyContent?: "start" | "end"; /** * 显示右上角的关闭、默认只有不显示下面的取消的时候才出现 */ showClose?: boolean; inline?: boolean; dataTrackId?: string; } declare const ActionSheet: (props: ActionProps) => ReactElement; export default ActionSheet;