@baskvava/react-video-modal
v0.1.0-alpha
Published
This is a react library for video embbeded in modal
Downloads
760
Maintainers
Readme
React-Video-Modal
This is a react library for a video inside of a modal
Installation
npm install @baskvava/react-video-modal
or
yarn add @baskvava/react-video-modal
Example
import React, { useState } from "react";
import { ModalVideo, useToggle } from "@baskvava/react-video-modal";
function App() {
const { isOpen, toggle, close } = useToggle();
return (
<div className="App">
<button onClick={toggle}>Open Video Modal</button>
<ModalVideo
title="video"
header="Fixed width Video"
width={800}
isOpen={isOpen}
onClosed={close}
url="https://storage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4"
/>
</div>
);
}
export default App;
Local ENV
install the node package
yarn install
run example
yarn dev