import React from 'react'; export type SwipeSide = 'left' | 'right'; export interface SwipeInstance { open: (side: SwipeSide) => void; close: () => void; } export interface SwipeProps { /** 自定义类名 */ className: string; /** 自定义样式 */ style: React.CSSProperties; /** * 标识符,可以在事件参数中获取到 * @default - */ name?: string | number; /** * 左侧滑动区域的内容 * @default - */ leftAction?: React.ReactNode; /** * 右侧滑动区域的内容 * @default - */ rightAction?: React.ReactNode; /** * 关闭前的回调函数,返回滑动区域所在方向 position * @default - */ beforeClose?: (position: string) => void; /** * 是否禁用滑动 * @default false */ disabled?: boolean; /** * 打开单元格侧边栏 * @default - */ onOpen?: ({ name, position, }: { name: string | number; position: SwipeSide; }) => void; /** * 收起单元格侧边栏 * @default - */ onClose?: ({ name, position, }: { name: string | number; position: SwipeSide; }) => void; /** * 点击左侧或者右侧时触发 * @default - */ onActionClick?: (event: Event, position: SwipeSide) => void; /** * onTouchStart * @default - */ onTouchStart?: (event: Event) => void /** * onTouchEnd * @default - */ onTouchEnd?: (event: Event) => void /** * onTouchMove * @default - */ onTouchMove?: (event: Event) => void children?: React.ReactNode; } export declare const Swipe: React.ForwardRefExoticComponent & Omit, "onTouchStart" | "onTouchMove" | "onTouchEnd"> & React.RefAttributes>;