react-photo-preview
simple photo preview dialog
Install
yarn add react-photo-preview
Basic usage
<PhotoPreview
sources={source}
/>
API
name | type | default | note |
---|---|---|---|
defaultCurrentIndex | String | 0 |
default index of active preview image |
sources | PreviewItem[] | [] |
preview image sources |
...restProps | props of rc-dialog |
PreviewItem
name | type | default | note |
---|---|---|---|
id | String | identify | |
title | String | title | |
src | String | location | |
desc | String | description |