tdesign-mobile-vue
Version:
tdesign-mobile-vue
33 lines (32 loc) • 958 B
TypeScript
import { BadgeProps } from '../badge';
import { PopupProps } from '../popup';
import { TNode } from '../common';
export interface TdActionSheetProps {
align?: 'center' | 'left';
cancelText?: string;
count?: number;
description?: string;
items?: Array<string | ActionSheetItem>;
popupProps?: PopupProps;
showCancel?: boolean;
showOverlay?: boolean;
theme?: 'list' | 'grid';
visible?: boolean;
defaultVisible?: boolean;
modelValue?: boolean;
onCancel?: (context: {
e: MouseEvent;
}) => void;
onClose?: (trigger: ActionSheetTriggerSource) => void;
onSelected?: (selected: ActionSheetItem | string, index: number) => void;
}
export interface ActionSheetItem {
label: string;
description?: string;
color?: string;
disabled?: boolean;
icon?: TNode;
suffixIcon?: TNode;
badge?: BadgeProps;
}
export type ActionSheetTriggerSource = 'overlay' | 'command' | 'select';