Skip to content

Commit

Permalink
Merge pull request #160 from OpenElements/sidenav
Browse files Browse the repository at this point in the history
Refactor code
  • Loading branch information
hendrikebbers authored Nov 29, 2023
2 parents a3e21b7 + 854f96c commit 01fce45
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 14 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from "react";
import { useMeasurements } from "../../hooks/hooks";
import { useParams } from "react-router-dom";
import { tableCellStyle, tableHeaderStyle } from "./measurementsStyles";

const MeasurementsTableComponent = ({ type }) => {
const { id } = useParams();
Expand Down Expand Up @@ -59,18 +60,4 @@ const MeasurementsTableComponent = ({ type }) => {
);
};

const tableHeaderStyle = {
backgroundColor: "#f2f2f2",
fontWeight: "bold",
border: "1px solid #ddd",
padding: "8px",
textAlign: "right", // Align numbers to the right
};

const tableCellStyle = {
border: "1px solid #ddd",
padding: "8px",
textAlign: "right", // Align numbers to the right
};

export default MeasurementsTableComponent;
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
const tableHeaderStyle = {
backgroundColor: "#f2f2f2",
fontWeight: "bold",
border: "1px solid #ddd",
padding: "8px",
textAlign: "left", // Align text to the left
};

const tableCellStyle = {
border: "1px solid #ddd",
padding: "8px",
textAlign: "right", // Align numbers to the right
};

export { tableCellStyle, tableHeaderStyle };

0 comments on commit 01fce45

Please sign in to comment.