forked from ngneat/elf
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- store-2.1.0
- store-2.0.0
- store-1.5.6
- store-1.5.5
- store-1.5.4
- store-1.5.3
- store-1.5.2
- store-1.5.1
- store-1.5.0
- store-1.4.0
- store-1.3.3
- store-1.3.2
- store-1.3.1
- store-1.3.0
- store-1.2.0
- store-1.1.0
- store-1.0.2
- store-1.0.1
- store-1.0.0
- state-history-1.0.1
- state-history-1.0.0
- requests-1.1.3
- requests-1.1.2
- requests-1.1.1
- requests-1.1.0
- requests-1.0.1
- requests-1.0.0
- persist-state-1.1.2
- persist-state-1.1.1
- persist-state-1.1.0
- persist-state-1.0.0
- pagination-1.0.1
- pagination-1.0.0
- entities-4.3.1
- entities-4.3.0
- entities-4.2.1
- entities-4.2.0
- entities-4.1.1
- entities-4.1.0
- entities-4.0.1
- entities-4.0.0
- entities-3.4.0
- entities-3.3.0
- entities-3.2.1
- entities-3.2.0
- entities-3.1.1
- entities-3.1.0
- entities-3.0.0
- entities-2.1.0
- entities-2.0.3
- entities-2.0.2
- entities-2.0.1
- entities-2.0.0
- entities-1.0.0
- devtools-1.2.1
- devtools-1.2.0
- devtools-1.1.0
- devtools-1.0.2
- devtools-1.0.1
- devtools-1.0.0
- cli-ng-1.0.0
- cli-3.0.0
- cli-2.2.0
- cli-2.1.0
- cli-2.0.0
- cli-1.1.0
- cli-1.0.0
1 parent
f1d2652
commit 42cbca7
Showing
10 changed files
with
164 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import './login-page.scss'; | ||
|
||
export function LoginPage() { | ||
return ( | ||
<> | ||
<h1 className="text-2xl mb-2">Login</h1> | ||
|
||
<form> | ||
<div className="mb-3"> | ||
<label htmlFor="email" className="form-label">Email address</label> | ||
<input type="email" className="form-control" id="email" /> | ||
</div> | ||
|
||
<div className="mb-3"> | ||
<label htmlFor="password" className="form-label">Password</label> | ||
<input type="password" className="form-control" id="password" /> | ||
</div> | ||
|
||
<button type="submit" className="btn btn-primary">Submit</button> | ||
</form> | ||
</> | ||
|
||
); | ||
} | ||
|
||
export default LoginPage; |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { Link } from 'react-router-dom'; | ||
import './nav.scss'; | ||
|
||
export function Nav() { | ||
return ( | ||
<nav className="navbar navbar-expand-lg navbar-light bg-light"> | ||
<div className="container-fluid"> | ||
|
||
<Link className="navbar-brand" to="/">Elf</Link> | ||
|
||
<button className="navbar-toggler" type="button"> | ||
<span className="navbar-toggler-icon"></span> | ||
</button> | ||
|
||
<div className="collapse navbar-collapse"> | ||
<ul className="navbar-nav me-auto mb-2 mb-lg-0"> | ||
<li className="nav-item"> | ||
<Link className="nav-link" to="/">Home</Link> | ||
</li> | ||
|
||
<li className="nav-item"> | ||
<Link className="nav-link" to="/products">Products</Link> | ||
</li> | ||
|
||
<li className="nav-item"> | ||
<Link className="nav-link" to="/login">Login</Link> | ||
</li> | ||
</ul> | ||
</div> | ||
</div> | ||
</nav> | ||
); | ||
} | ||
|
||
export default Nav; |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import './product.scss'; | ||
|
||
|
||
export interface ProductProps { | ||
product: Product; | ||
} | ||
|
||
export interface Product { | ||
id: number; | ||
title: string; | ||
description: string; | ||
} | ||
|
||
export function Product({ product: { title, description, id } }: ProductProps) { | ||
return ( | ||
<div className="card"> | ||
<div className="card-body"> | ||
<h5 className="card-title">{title}</h5> | ||
<h6 className="card-subtitle mb-2 text-muted">{description}</h6> | ||
{/* <a href="#" className="card-link">Card link</a> */} | ||
{/* <a href="#" className="card-link">Another link</a> */} | ||
</div> | ||
</div> | ||
); | ||
} | ||
|
||
export default Product; |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import Product from './product/product'; | ||
import './products-page.scss'; | ||
|
||
const products = Array.from({ length: 10 }).map((_, i) => ({ | ||
id: i, | ||
title: `Product ${i}`, | ||
description: 'lorem ipsum' | ||
})) | ||
|
||
export function ProductsPage() { | ||
return ( | ||
<> | ||
<h1 className="text-2xl mb-2">Products</h1> | ||
|
||
<section className="flex flex-wrap gap-2"> | ||
{products.map(product => ( | ||
<div className="w-3/12"> | ||
<Product product={product} key={product.id} /> | ||
</div> | ||
))} | ||
|
||
</section> | ||
|
||
</> | ||
); | ||
} | ||
|
||
export default ProductsPage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,21 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<title>React</title> | ||
<base href="/" /> | ||
|
||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
<link rel="icon" type="image/x-icon" href="favicon.ico" /> | ||
</head> | ||
<body> | ||
<div id="root"></div> | ||
</body> | ||
</html> | ||
|
||
<head> | ||
<meta charset="utf-8" /> | ||
<title>React</title> | ||
<base href="/" /> | ||
|
||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
<link rel="icon" type="image/x-icon" href="favicon.ico" /> | ||
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" | ||
integrity="sha384-F3w7mX95PdgyTmZZMECAngseQB83DfGTowi0iMjiWaeVhAn4FJkqJByhZMI3AhiU" crossorigin="anonymous"> | ||
<link href="https://unpkg.com/tailwindcss@^2/dist/tailwind.min.css" rel="stylesheet"> | ||
|
||
</head> | ||
|
||
<body> | ||
<div id="root"></div> | ||
</body> | ||
|
||
</html> |