diff --git a/apps/pwa/src/components/periodic-table/PeriodicTable.tsx b/apps/pwa/src/components/periodic-table/PeriodicTable.tsx index 6396ad8c..cba2ec2a 100644 --- a/apps/pwa/src/components/periodic-table/PeriodicTable.tsx +++ b/apps/pwa/src/components/periodic-table/PeriodicTable.tsx @@ -34,7 +34,7 @@ function EmptyElement() { ); } -function LabelCell({ +function PeriodCell({ children, border, }: { @@ -42,15 +42,22 @@ function LabelCell({ border: "left" | "top" | "none"; }) { return ( -
-
-
{children}
+
+
+
{children}
+
+
+ ); +} + +function GroupCell({ number, name }: { number: number; name: string }) { + return ( +
+
+ {number} + + {name} +
); @@ -59,25 +66,25 @@ function LabelCell({ function buildTable(elementRenderer: ElementRendered) { const rows: JSX.Element[] = [
- - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 - 12 - 13 - 14 - 15 - 16 - 17 - 18 +
+ + + + + + + + + + + + + + + + + +
, ]; @@ -88,10 +95,10 @@ function buildTable(elementRenderer: ElementRendered) {
{i <= 6 ? ( // TODO: localize "Period N" - {i + 1} + {i + 1} ) : ( // TODO: localize and label "Lanthanides" and "Actinides" - + )} {row.map((element, index) => {