import type { ExtractPropTypes, CSSProperties } from 'vue'; import type { PlacementType } from './placements'; import type { VueNode } from '../_util/type'; import { someType, stringType, objectType, functionType } from '../_util/type'; export const tourStepInfo = () => ({ arrow: someType([Boolean, Object]), target: someType HTMLElement) | null | (() => null)>([ String, Function, Object, ]), title: someType([String, Object]), description: someType([String, Object]), placement: stringType(), mask: someType([Object, Boolean], true), className: { type: String }, style: objectType(), scrollIntoViewOptions: someType([Boolean, Object]), }); export type TourStepInfo = Partial>>; export const tourStepProps = () => ({ ...tourStepInfo(), prefixCls: { type: String }, total: { type: Number }, current: { type: Number }, onClose: functionType<(e: MouseEvent) => void>(), onFinish: functionType<(e: MouseEvent) => void>(), renderPanel: functionType<(step: any, current: number) => VueNode>(), onPrev: functionType<(e: MouseEvent) => void>(), onNext: functionType<(e: MouseEvent) => void>(), }); export type TourStepProps = Partial>>;