UNPKG

@nutui/nutui-react

Version:

京东风格的轻量级移动端 React 组件库,支持一套代码生成 H5 和小程序

44 lines (43 loc) 1.08 kB
import { default as React, FunctionComponent, ReactNode } from 'react'; import { PopupProps } from '../popup/index'; export type ActionSheetOption<T> = { [key: string]: T; }; export interface ActionSheetProps extends PopupProps { /** * 遮罩层可见 * @default false */ visible: boolean /** * 设置列表面板副标题/描述 * @default - */ description: ReactNode /** * 列表项 * @default [] */ options: ActionSheetOption<string | boolean>[] /** * 列表项的自定义设置 * @default - */ optionKey: ActionSheetOption<string> /** * 取消文案 * @default 取消 */ cancelText: ReactNode /** * 点击取消文案时触发 * @default - */ onCancel: () => void /** * 选择之后触发 * @default - */ onSelect: (item: ActionSheetOption<string | boolean>, index: number) => void } export declare const ActionSheet: FunctionComponent<Partial<ActionSheetProps> & Omit<React.HTMLAttributes<HTMLDivElement>, 'title' | 'onSelect'>>;