diff --git a/public/index.html b/public/index.html index aa069f2..9deddda 100644 --- a/public/index.html +++ b/public/index.html @@ -24,7 +24,7 @@ work correctly both with client-side routing and a non-root public URL. Learn how to configure a non-root public URL by running `npm run build`. --> - React App + Zoom diff --git a/src/App.jsx b/src/App.jsx index 34d0f7a..9978308 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -39,23 +39,41 @@ function App() { const layoutCSS = { minHeight: "100%", display: "flex", - flexDirection: paneWidth < 800 ? 'column' : 'row', + flexDirection: paneWidth < 800 ? "column" : "row", justifyContent: "space-between", - paddingBottom: '52px', + paddingBottom: "52px", }; - const smallLayoutCss = { - width: '80%' + // const smallLayoutCss = { + // width: "80%", + // }; + + const mediumLayoutCss = { + flex: "0.8", + }; + + const LargeLayoutCSS = { + flex: "0.5", + }; + + let conditionalStyles = {}; + + if (paneWidth > 1000 && toggleVideoView === false) { + conditionalStyles = LargeLayoutCSS; + } else if (paneWidth > 800 && toggleVideoView === false) { + conditionalStyles = mediumLayoutCss; + } else { + conditionalStyles = null; } useEffect(() => { const handleViewPadding = () => { - if (paneWidth > 1100 && toggleVideoView == true) { + if (paneWidth > 900 && toggleVideoView == false) { // return padding = paneWidth / 100 } - } - handleViewPadding(); - }, [sizes, viewportWidth]) + }; + handleViewPadding(); + }, [sizes, viewportWidth]); const handleResize = () => { setViewportWidth(window.innerWidth); @@ -155,9 +173,16 @@ function App() { onChange={setSizes} className="split-pane-section" > - +
-
+
900 ? "5%" : null, + }} + // style={conditionalStyles} + className={`view-wrapper ${toggleVideoView ? "" : "d-none"}`} + >
@@ -185,7 +210,12 @@ function App() { {isVideoVisible ? ( ) : ( -

{videoName}

+

+ {videoName} +

)}
@@ -193,13 +223,26 @@ function App() {
-
-
+
900 && toggleVideoView === true ? "5%" : null, + }} + // style={conditionalStyles} + className="view-wrapper" + > +
{isWebcamVisible ? ( ) : ( -

{myName}

+

+ {myName} +

)}
diff --git a/src/index.css b/src/index.css index e89bda5..6dd3f29 100644 --- a/src/index.css +++ b/src/index.css @@ -26,17 +26,21 @@ input:focus-visible { flex: 1; justify-self: center; align-items: center; + justify-content: center; + width: 80%; } -/* @media screen and (min-width: ) { - -} */ +@media screen and (min-width: 800px) { + .view-wrapper { + padding: 0 10px; + } +} .view-title { color: white; font-weight: bold; text-wrap: nowrap; - font-size: 5vw; + /* font-size: 5vw; */ clear: right; overflow: hidden; }