From fa766b123df4a54f08f4b28a4db0b2a193a2efbd Mon Sep 17 00:00:00 2001 From: Reza_ashrafi Date: Sat, 20 Nov 2021 14:41:47 +0330 Subject: [PATCH] reza added dark mode switch --- src/components/JolPlayer/index.js | 2 +- src/components/Navbar/index.tsx | 2 + src/components/ThemeSwitch/index.scss | 187 ++++++++++++++++++++++++++ src/components/ThemeSwitch/index.tsx | 27 ++++ src/custom.scss | 1 + src/views/VideoTube/index.scss | 2 +- src/views/VideoTube/index.tsx | 25 ++-- 7 files changed, 233 insertions(+), 13 deletions(-) create mode 100644 src/components/ThemeSwitch/index.scss create mode 100644 src/components/ThemeSwitch/index.tsx diff --git a/src/components/JolPlayer/index.js b/src/components/JolPlayer/index.js index b723352..ad53604 100644 --- a/src/components/JolPlayer/index.js +++ b/src/components/JolPlayer/index.js @@ -7,7 +7,7 @@ const Video = ({ fileIds, posterId }) => { option={{ videoSrc: `https://dnvn.ir/api/v1/file/${fileIds}`, width: "100%", - height: window.innerWidth > 1000 ? 450 : 250, + height: window.innerWidth > 1000 ? window.innerHeight - 300 : 250, theme: "#4dd35b", language: "en", isShowMultiple: window.innerWidth > 700, diff --git a/src/components/Navbar/index.tsx b/src/components/Navbar/index.tsx index 26242bf..8d3fa7c 100644 --- a/src/components/Navbar/index.tsx +++ b/src/components/Navbar/index.tsx @@ -12,6 +12,7 @@ import { connect } from "react-redux"; import _ from "lodash"; import searchIcon from "../../assets/icons/search.png"; import searchBlackIcon from "../../assets/icons/searchBlack.svg"; +import ThemeSwitch from "../ThemeSwitch"; const useStyles = makeStyles({ list: { @@ -95,6 +96,7 @@ function Navbar(props: any) { onClick={toggleDrawer("right", true)} />