UNPKG

@nutui/nutui-react-taro

Version:

京东风格的轻量级移动端 React 组件库,支持一套代码生成 H5 和小程序

47 lines (46 loc) 1.2 kB
import { FunctionComponent, ReactNode } from 'react'; import { BasicComponent } from '../../utils/typings'; export type ImagePreviewCloseIconPosition = 'top-right' | 'top-left' | 'bottom'; export interface ImageOption { src: string; index?: number; } export interface VideoOption { source: { src: string; type: string; }; options: { muted: boolean; controls: boolean; }; index?: number; } export interface ImagePreviewProps extends BasicComponent { images: Array<{ src: string; }>; videos: Array<{ source: { src: string; type: string; }; options: { muted: boolean; controls: boolean; }; }>; visible: boolean; autoPlay: number | string; value?: number; defaultValue: number; closeOnContentClick: boolean; pagination: boolean; indicator: boolean; indicatorColor: string; closeIcon: boolean | ReactNode; closeIconPosition: ImagePreviewCloseIconPosition; onChange: (value: number) => void; onClose: () => void; } export declare const ImagePreview: FunctionComponent<Partial<ImagePreviewProps>>;