File tree Expand file tree Collapse file tree 3 files changed +20
-18
lines changed Expand file tree Collapse file tree 3 files changed +20
-18
lines changed Original file line number Diff line number Diff line change 55
55
width : 60% ;
56
56
margin-top : 20px ;
57
57
}
58
-
59
- .canvas-container {
60
- display : flex;
61
- justify-content : center;
62
- align-items : center;
63
- height : 100% ;
64
- width : 100% ;
65
- }
66
-
67
- .canvas {
68
- height : 100% ;
69
- width : 86vw ;
70
- background-color : rgb (212 , 212 , 13 );
71
- }
72
58
73
59
74
60
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import Toolbar from "./components/Toolbar";
9
9
import Socials from "./components/Socials" ;
10
10
import LoginAndLogout from "./components/LoginAndLogout" ;
11
11
import Sidebar from "./components/Sidebar" ;
12
+ import Canvas from "./components/Canvas" ;
12
13
13
14
function App ( ) {
14
15
const canvasRef = useRef ( null ) ;
@@ -119,10 +120,12 @@ function App() {
119
120
120
121
return (
121
122
< div id = "container" style = { { display : "flex" } } >
122
- < Sidebar clearOnClick = { clearOnClick } ref = { sidebarRef } id = "clear" > </ Sidebar >
123
- < div className = "canvas-container" >
124
- < canvas className = "canvas" ref = { canvasRef } > </ canvas >
125
- </ div >
123
+ < Sidebar
124
+ clearOnClick = { clearOnClick }
125
+ ref = { sidebarRef }
126
+ id = "clear"
127
+ > </ Sidebar >
128
+ < Canvas canvasRef = { canvasRef } > </ Canvas >
126
129
</ div >
127
130
) ;
128
131
}
Original file line number Diff line number Diff line change
1
+ /* eslint-disable react/prop-types */
2
+ function Canvas ( props ) {
3
+ return (
4
+ < div className = "flex justify-center items-center h-full w-80vw overflow-hidden" >
5
+ < canvas
6
+ className = "h-full w-86vw bg-yellow-600"
7
+ ref = { props . canvasRef }
8
+ > </ canvas >
9
+ </ div >
10
+ ) ;
11
+ }
12
+
13
+ export default Canvas ;
You can’t perform that action at this time.
0 commit comments