the-flick
Flickable viewer of the-components
Installation
$ npm install the-flick --save
Usage
Live Demo is hosted on GitHub Page
'use strict' const imageUrls = 'https://raw.githubusercontent.com/apeman-asset-labo/apeman-asset-images/master/dist/dummy/01.jpg' 'https://raw.githubusercontent.com/apeman-asset-labo/apeman-asset-images/master/dist/dummy/02.jpg' 'https://raw.githubusercontent.com/apeman-asset-labo/apeman-asset-images/master/dist/dummy/03.jpg' 'https://raw.githubusercontent.com/apeman-asset-labo/apeman-asset-images/master/dist/dummy/04.jpg' const videoUrls = './mov_bbb.mp4' PureComponent { superprops thisstate = activeIndex: 1 present: true } { return <div> <TheButtonStyle/> <TheSpinStyle/> <TheImageStyle/> <TheVideoStyle/> <TheFlickStyle/> <TheButton onClick= this> Show Flick Images </TheButton> <TheFlick activeIndex=thisstateactiveIndex onChange= this present=thisstatepresent onClose= this images= imageUrls0 src: imageUrls1 spinning: true src: imageUrls2 title: 'Some title' src: imageUrls3 title: 'Some title' description: 'This is image description' src: videoUrls0 title: 'Some video' /> </div> }
Components
TheFlick
Flickable viewer of the-components
Props
Name | Type | Description | Default |
---|---|---|---|
activeIndex |
number | Active index of images | 0 |
images |
arrayOf union | Images to flip | [] |
onChange |
func | Handle index change | () => {} |
onClose |
func | Close handler | () => {} |
present |
bool | Shows the dialog | false |
spinning |
bool | Show spin | false |
title |
string | null |
TheFlickImage
TheFlickStyle
Style for TheFlick
Props
Name | Type | Description | Default |
---|---|---|---|
options |
object | Style options | {} |
License
This software is released under the MIT License.