@@ -11,36 +11,69 @@ export default App;`;
1111
1212export const LayoutReact = ( isTsProject : boolean ) => `import React from "react";
1313import { Link } from "react-router-dom";
14+ import styles from "./Layout.module.css";
1415
1516${ ! isTsProject ? "// eslint-disable-next-line react/prop-types" : "" }
1617const Layout = ({ children }${
1718 isTsProject ? ": { children: React.ReactNode }" : ""
1819} ) => {
1920 return (
20- < >
21- <div style={{ margin: "1rem" } }>
21+ <main className={styles.main} >
22+ <nav className={styles.nav }>
2223 <div>
23- <ul>
24- <li>
25- <Link to={"/"}>Home</Link>
26- </li>
27- <li>
28- <Link to={"/contact"}>Contact</Link>
29- </li>
30- <li>
31- <Link to={"/about"}>About</Link>
32- </li>
33- </ul>
24+ <img src="https://ik.imagekit.io/ashishkk22/simform_logo.svg?updatedAt=1697020836220" alt="simform_logo" />
3425 </div>
35- </div>
26+ <div>
27+ <div>
28+ <ul className={styles.nav_ul}>
29+ <li>
30+ <Link to={"/"} className={styles.nav_link}>
31+ Home
32+ </Link>
33+ </li>
34+ <li>
35+ <Link to={"/contact"} className={styles.nav_link}>
36+ Contact
37+ </Link>
38+ </li>
39+ <li>
40+ <Link to={"/about"} className={styles.nav_link}>
41+ About
42+ </Link>
43+ </li>
44+ </ul>
45+ </div>
46+ </div>
47+ </nav>
3648 {children}
37- </>
49+ </main >
3850 );
3951};
4052
4153export default Layout;
4254` ;
4355
56+ const layoutCss = `.nav {
57+ background-color: #ea495c;
58+ display: flex;
59+ justify-content: space-around;
60+ align-items: center;
61+ padding: 1rem 0;
62+ }
63+
64+ .nav_ul {
65+ list-style-type: none;
66+ display: flex;
67+ justify-content: space-around;
68+ width: 20rem;
69+ }
70+
71+ .nav_link {
72+ text-decoration: none;
73+ color: white;
74+ }
75+ ` ;
76+
4477export const getPagesComponentReact = (
4578 name : string
4679) => `import React from "react";
@@ -259,6 +292,33 @@ export class SuspenseErrorBoundary extends React.Component${
259292}
260293` ;
261294
295+ const indexCssReset = `@import url("https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,300;1,400;1,500;1,600;1,700;1,800&family=Poppins:wght@200;300;400;500&family=Roboto:wght@300;400;500&display=swap");
296+
297+ *,
298+ *::before,
299+ *::after {
300+ box-sizing: border-box;
301+ }
302+
303+ * {
304+ margin: 0;
305+ padding: 0;
306+ font-family: "Poppins";
307+ }
308+
309+ html,
310+ body {
311+ height: 100%;
312+ }
313+
314+ input,
315+ button,
316+ textarea,
317+ select {
318+ font: inherit;
319+ }
320+ ` ;
321+
262322const ReactRouterDomReactPlugin : PluginConfigType = {
263323 initializingMessage : "Adding React Router Dom ! Please Wait !" ,
264324 dependencies : "react-router-dom" ,
@@ -275,6 +335,12 @@ const ReactRouterDomReactPlugin: PluginConfigType = {
275335 fileName : "Layout" ,
276336 fileType : "component" ,
277337 } ,
338+ {
339+ path : [ "src" , "components" , "layout" ] ,
340+ content : layoutCss ,
341+ fileName : "Layout.module.css" ,
342+ fileType : "simple" ,
343+ } ,
278344 {
279345 path : [ "src" , "components" , "about" ] ,
280346 content : getPagesComponentReact ( "About" ) ,
@@ -329,6 +395,12 @@ const ReactRouterDomReactPlugin: PluginConfigType = {
329395 fileName : "SuspenseErrorBoundary" ,
330396 fileType : "component" ,
331397 } ,
398+ {
399+ path : [ "src" ] ,
400+ content : indexCssReset ,
401+ fileName : "index.css" ,
402+ fileType : "simple" ,
403+ } ,
332404 ] ,
333405 successMessage : "Successfully added React Router Dom !" ,
334406} ;
0 commit comments