1 import React, {useState,useEffect} from "react";
2 import {getWindowSize} from "../../components/disSize";
4 export default function ResElementTest ({children}:any) {
5 const {width} = getWindowSize();
6 const [debugColor]= useState({backcolor: ""})
7 const [debugDisp]= useState({disp: ""});
8 const [returnMode]= useState({p: ""});
11 // when under width of 570px
12 debugColor.backcolor = "red";
13 debugDisp.disp = "flex";
16 // when over width of 570px
17 debugColor.backcolor = "blue";
18 debugDisp.disp = "block";
19 returnMode.p = "Mobile"
24 backgroundColor: debugColor.backcolor,
25 display: debugDisp.disp,
27 <h1>{returnMode.p}</h1>
28 <div style={{backgroundColor: "yellow",color: "black"}}>
31 <div style={{backgroundColor: "yellow",color: "black"}}>
34 <div style={{backgroundColor: "yellow",color: "black"}}>
41 // Properties<string | number, string&{}> {