From 143a0cf051b4a6bb99e384f182745da224d5ac5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciek=20G=C5=82owacki?= Date: Wed, 5 Aug 2020 23:54:30 +0200 Subject: [PATCH] Rewritten table --- src/components/Scheduler/Row.jsx | 0 src/components/Scheduler/index.tsx | 78 +++++++++++++++++++++++++++++- 2 files changed, 76 insertions(+), 2 deletions(-) create mode 100644 src/components/Scheduler/Row.jsx diff --git a/src/components/Scheduler/Row.jsx b/src/components/Scheduler/Row.jsx new file mode 100644 index 0000000..e69de29 diff --git a/src/components/Scheduler/index.tsx b/src/components/Scheduler/index.tsx index a38b0eb..1f14b32 100644 --- a/src/components/Scheduler/index.tsx +++ b/src/components/Scheduler/index.tsx @@ -28,6 +28,32 @@ for (let i = 0; i < hours.length / 2; i++) { events.push(i); } +let center: "center" = "center"; +let row: "row" = "row"; +let column: "column" = "column"; +let wrap: "wrap" = "wrap"; +const tbodyStyles = { + width: 900, + height: 560, + backgroundColor: "blue", + display: "flex", + flexDirection: column, + // flexWrap: wrap + +} + +const rowStyles = { + display: "flex", + flexDirection: row, +} + +const cellStyles = { + border: "1px solid #ddd", + padding: "10px", + textAlign: center, + flex: 1, +} + let terms = ["Zawsze", "jest pora", "na kurde", "lody", "koral"]; export const Scheduler = () => { @@ -66,7 +92,55 @@ export const Scheduler = () => { ))} -
+
+ {hours.map((hour, index) => ( +
{ + [hour, "", "", "", "", ""].map((value) => ( +
{value}
+ ))}
+ ))} +
+
+ {["", "", "", "", ""].map((value, index) => ( +
+ +
+ ))} +
+
+ {["", "", "", "", ""].map((value, index) => ( +
+ +
+ ))} +
+ {["", "", "", "", ""].map((value, index) => ( +
+ +
+ ))} +
+ {["", "", "", "", ""].map((value, index) => ( +
+ +
+ ))} +
+ {["", "", "", "", ""].map((value, index) => ( +
+ +
+ ))} +
+ {["", "", "", "", ""].map((value, index) => ( +
+ +
+ ))} +
+ + + {/*
{terms.map((_, colIndex) => ( { ))} -
+
*/} );