1.0.3 • Published 5 years ago

react-youtube-slide v1.0.3

Weekly downloads
3
License
ISC
Repository
github
Last release
5 years ago

react-youtube-slide

Youtube thumnail slide and player

스크린샷 2019-05-08 오후 5 22 02 스크린샷 2019-05-08 오후 5 22 17

Installation

$ npm install react-youtube-slide

Usage

  <Gallery
    youtubes={Json}
    galleryId={String} 
  />

Example

import React from 'react';
import ReactDOM from 'react-dom';
import Gallery from 'react-youtube-slide';

const RESCOURCES = [
    {
      id: "9bZkp7q19f0",                //youtube id
      title: "[Psy]Gangnam style",      //thumnail title
      descrp : "Psy - Gangnam style"    //thumnail desciption
    },
    {
      id: "XsX3ATc3FbA",
      title: "(Boy With Luv) feat. Halsey' Official MV",
      descrp : "BTS - (Boy With Luv) feat. Halsey' Official MV"
    }
    ...
  ]

//parameter name must be youtubes and galleryId
ReactDOM.render(<Gallery youtubes={RESCOURCES} galleryId='gallery1' />,
document.getElementById('root'));