From d72640ab4a9ff374aa0a52ce8a816a748ed2bd39 Mon Sep 17 00:00:00 2001 From: Kristoffer Longva Eriksen Date: Tue, 15 Mar 2022 14:46:03 +0100 Subject: [PATCH] Added css and dates for list elements --- src/client/src/components/list_component.js | 10 ++++++++++ src/client/src/index.css | 18 +++++++++++++++--- src/client/src/index.js | 8 ++++---- src/client/src/list_component.js | 14 -------------- 4 files changed, 29 insertions(+), 21 deletions(-) create mode 100644 src/client/src/components/list_component.js delete mode 100644 src/client/src/list_component.js diff --git a/src/client/src/components/list_component.js b/src/client/src/components/list_component.js new file mode 100644 index 0000000..938b48f --- /dev/null +++ b/src/client/src/components/list_component.js @@ -0,0 +1,10 @@ +import React from "react"; +import ReactDOM from "react-dom"; + +export default function ListElement(props) { + return ( +
+ {props.name}, {props.competitors} competitors, Date: {props.date} +
+ ); +} diff --git a/src/client/src/index.css b/src/client/src/index.css index ec2585e..de2a7cb 100644 --- a/src/client/src/index.css +++ b/src/client/src/index.css @@ -1,13 +1,25 @@ body { margin: 0; - font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', - 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", + "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; + background-color: #eeeeee; } code { - font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', + font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New", monospace; } + +.ListElement { + background-color: #073b4c; + width: 800px; + height: 45px; + position: relative; + top: 250px; + left: 100px; + margin-bottom: 10px; + color: #eeeeee; +} diff --git a/src/client/src/index.js b/src/client/src/index.js index 2a42bd8..adc181f 100644 --- a/src/client/src/index.js +++ b/src/client/src/index.js @@ -1,13 +1,13 @@ import React from "react"; import ReactDOM from "react-dom"; import "./index.css"; -import ListElement from "./list_component"; +import ListElement from "./components/list_component"; ReactDOM.render( - - - + + + , document.getElementById("root") ); diff --git a/src/client/src/list_component.js b/src/client/src/list_component.js deleted file mode 100644 index 46e53e1..0000000 --- a/src/client/src/list_component.js +++ /dev/null @@ -1,14 +0,0 @@ -import React from "react"; -import ReactDOM from "react-dom"; - -export default class ListElement extends React.Component { - render() { - return ( - <> -
Turnering 1, deltakere, Dato
- - ); - } -} - -ReactDOM.render(, document.getElementById("root"));