appleple / react-modal-video

Accessible React Modal Video Component
https://appleple.github.io/react-modal-video/
MIT License
177 stars 86 forks source link

Affected by DOM structure? #68

Closed IlirBajrami closed 3 years ago

IlirBajrami commented 3 years ago

Am i missing some css or...?

This is my VideoModal component:

import React, { useState } from "react";
import ModalVideo from "react-modal-video";
import styled from "styled-components";

import video_mockup from "../../resources/video_mockup.png";

function VideoModal(props) {
  const [videoIsOpen, setVideoIsOpen] = useState(false);
  return (
    <>
      <ModalVideo
        channel="youtube"
        autoplay
        isOpen={videoIsOpen}
        videoId="L61p2uyiMSo"
        onClose={() => setVideoIsOpen(false)}
      />

      <Mockup
        src={video_mockup}
        alt="mockup1"
        onClick={() => setVideoIsOpen(true)}
      />
    </>
  );
}

const Mockup = styled.img`
  width: 100%;
`;

export default VideoModal;

and this is what i get:

Screenshot 2021-08-12 at 14 46 39
IlirBajrami commented 3 years ago

sorry, i figured out i had to import sass:

import "react-modal-video/scss/modal-video.scss";