@uiw/react-native
Version:
UIW for React Native
29 lines (28 loc) • 993 B
TypeScript
import React from 'react';
import { ViewStyle } from 'react-native';
import Swipeable, { SwipeableProps } from 'react-native-gesture-handler/Swipeable';
export interface Column {
/** 显示文字 */
text: string;
/** 背景色 */
color: string;
/** 点击元素触发 */
onPress?: () => void;
/** 是否禁用 */
disabled?: boolean;
/** 自定义元素 */
render?: (text: string, record: Column, index: number) => React.ReactNode;
}
export interface SwipeActionProps extends SwipeableProps {
/** 右边滑动出来的元素 */
right?: Array<Column>;
/** 左边滑动出来的元素 */
left?: Array<Column>;
/** 按钮宽度 默认60 */
buttonWidth?: number;
actionViewStyle?: ViewStyle;
rectButtonStyle?: ViewStyle;
children?: React.ReactNode;
}
declare const _default: React.ForwardRefExoticComponent<SwipeActionProps & React.RefAttributes<Partial<React.LegacyRef<Swipeable>> | undefined>>;
export default _default;