File tree Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Original file line number Diff line number Diff line change 11import { useState } from "react" ;
2+ import Main from "./components/layout/Main" ;
23import Header from "./pages/Header" ;
34import Options from "./pages/Options" ;
45import Preview from "./pages/Preview" ;
@@ -12,10 +13,10 @@ const App = () => {
1213 < div className = "bg-gh-bg w-full min-h-screen overflow-x-hidden select-none pb-5" >
1314 < Header />
1415
15- < main className = "flex gap-4 mx-4 sm:mx-10 md:mx-32 lg:mx-36 mt-6 flex-col lg:flex-row" >
16+ < Main >
1617 < Options setLink = { ( link : string ) => setLink ( link ) } />
1718 < Preview link = { link } />
18- </ main >
19+ </ Main >
1920 </ div >
2021 ) ;
2122} ;
Original file line number Diff line number Diff line change 1+ import { FC , ReactElement } from "react" ;
2+
3+ interface MainProps {
4+ children : ReactElement [ ] ;
5+ }
6+
7+ const Main : FC < MainProps > = ( { children } ) => {
8+ return (
9+ < main className = "flex gap-4 mx-4 sm:mx-10 md:mx-32 lg:mx-36 mt-6 flex-col lg:flex-row" >
10+ { children }
11+ </ main >
12+ ) ;
13+ } ;
14+
15+ export default Main ;
You can’t perform that action at this time.
0 commit comments