1
Fork 0
mirror of https://github.com/pds-nest/nest.git synced 2024-11-22 13:04:19 +00:00

Add page routing

This commit is contained in:
Stefano Pigozzi 2021-04-21 18:21:30 +02:00
parent bf73bc4a7b
commit 882de3bac8
Signed by untrusted user who does not match committer: steffo
GPG key ID: 6965406171929D01
9 changed files with 79 additions and 21 deletions

View file

@ -9,6 +9,11 @@ import InputWithIcon from "./components/InputWithIcon"
import Layout from "./components/Layout"
import ContextTheme from "./contexts/ContextTheme"
import { BrowserRouter } from "react-router-dom"
import { Route, Switch } from "react-router"
import PageHome from "./routes/PageHome"
import PageRepositories from "./routes/PageRepositories"
import PageAlerts from "./routes/PageAlerts"
import PageSettings from "./routes/PageSettings"
export default function App() {
@ -20,27 +25,20 @@ export default function App() {
<div className={classNames(Style.App, theme)}>
<Layout>
<BoxWithHeader
header={"Sto provando i bottoni!"}
>
<div>
<div>
Ammirate:
</div>
<div>
<Button color={"Green"} icon={faArrowRight}>Verde</Button>
<Button color={"Grey"} icon={faArchive}>Grigio</Button>
<Button color={"Yellow"} icon={faExclamationTriangle}>Giallo</Button>
<Button color={"Red"} icon={faTrash}>Rosso</Button>
</div>
<div>
E già che ci siamo, un Input, con e senza icona:
</div>
<div>
<Input/> <InputWithIcon icon={faSearch}/>
</div>
</div>
</BoxWithHeader>
<Switch>
<Route path={"/"}>
<PageHome/>
</Route>
<Route path={"/repositories"}>
<PageRepositories/>
</Route>
<Route path={"/alerts"}>
<PageAlerts/>
</Route>
<Route path={"/settings"}>
<PageSettings/>
</Route>
</Switch>
</Layout>
</div>

View file

@ -0,0 +1,12 @@
import React from "react"
import Style from "./PageAlerts.module.css"
import classNames from "classnames"
export default function PageAlerts({ children, className, ...props }) {
return (
<div className={classNames(Style.PageAlerts, className)} {...props}>
{children}
</div>
)
}

View file

@ -0,0 +1,3 @@
.PageAlerts {
}

View file

@ -0,0 +1,12 @@
import React from "react"
import Style from "./PageHome.module.css"
import classNames from "classnames"
export default function PageHome({ children, className, ...props }) {
return (
<div className={classNames(Style.PageHome, className)} {...props}>
{children}
</div>
)
}

View file

@ -0,0 +1,3 @@
.PageHome {
}

View file

@ -0,0 +1,12 @@
import React from "react"
import Style from "./PageRepositories.module.css"
import classNames from "classnames"
export default function PageRepositories({ children, className, ...props }) {
return (
<div className={classNames(Style.PageRepositories, className)} {...props}>
{children}
</div>
)
}

View file

@ -0,0 +1,3 @@
.PageRepositories {
}

View file

@ -0,0 +1,12 @@
import React from "react"
import Style from "./PageSettings.module.css"
import classNames from "classnames"
export default function PageSettings({ children, className, ...props }) {
return (
<div className={classNames(Style.PageSettings, className)} {...props}>
{children}
</div>
)
}

View file

@ -0,0 +1,3 @@
.PageSettings {
}