Skip to content

Commit e197172

Browse files
author
Clint Goodman
committed
step4: right sidebar
1 parent e5dd728 commit e197172

File tree

2 files changed

+36
-1
lines changed

2 files changed

+36
-1
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import React from "react";
2+
import Box from "../Box";
3+
import { css } from "emotion";
4+
import faker from "faker";
5+
import { getLorem } from "../../util/common";
6+
7+
const tileStyles = css({
8+
display: "flex",
9+
alignItems: "center",
10+
margin: 4,
11+
"& > *": {
12+
margin: 4,
13+
},
14+
});
15+
16+
const small = css({
17+
fontSize: 10,
18+
});
19+
20+
const Tile = () => (
21+
<div className={tileStyles}>
22+
<Box icon black />
23+
<section>
24+
<div>{faker.name.firstName()}</div>
25+
<div className={small}>{getLorem(2, 3)}</div>
26+
</section>
27+
</div>
28+
);
29+
30+
export default Tile;
Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
import React from "react";
2+
import Tile from "./Tile";
23

3-
const RightSidebar = () => <aside>Right Sidebar</aside>;
4+
const TILES = 30;
5+
6+
const RightSidebar = () => (
7+
<aside>{new Array(TILES).fill(0).map((e, i) => <Tile key={i} />)}</aside>
8+
);
49

510
export default RightSidebar;

0 commit comments

Comments
 (0)