@td-design/react-native
Version:
react-native UI组件库
35 lines • 1.18 kB
TypeScript
import React, { PropsWithChildren } from 'react';
import { StyleProp, TextStyle, ViewStyle } from 'react-native';
export interface SwipeAction {
/** 操作项文本 */
label: string;
/** 操作项文本样式 */
textStyle?: StyleProp<TextStyle>;
/** 操作项点击事件 */
onPress: () => void;
/** 背景色 */
backgroundColor: string;
}
export type SwipeRowProps = PropsWithChildren<{
/** 必传,作为互斥的判断标准 */
anchor: string | number;
/** 右侧滑出的操作项 */
actions?: SwipeAction[];
/** 每个操作项的宽度 */
actionWidth: number;
/** 删除事件 */
onRemove?: () => Promise<boolean>;
/** 是否覆盖默认操作项 */
overwriteDefaultActions?: boolean;
/** Swipeable自身的样式 */
containerStyle?: StyleProp<ViewStyle>;
/** Swipeable的子组件样式 */
contentContainerStyle?: StyleProp<ViewStyle>;
}>;
declare const _default: React.FC<SwipeRowProps> & {
Provider: ({ children, multiple, }: React.PropsWithChildren<{
multiple?: boolean | undefined;
}>) => JSX.Element;
};
export default _default;
//# sourceMappingURL=index.d.ts.map