Added css and dates for list elements

This commit is contained in:
Kristoffer Longva Eriksen 2022-03-15 14:46:03 +01:00
parent 8e90a7ac37
commit d72640ab4a
4 changed files with 29 additions and 21 deletions

View File

@ -0,0 +1,10 @@
import React from "react";
import ReactDOM from "react-dom";
export default function ListElement(props) {
return (
<div className="ListElement">
{props.name}, {props.competitors} competitors, Date: {props.date}
</div>
);
}

View File

@ -1,13 +1,25 @@
body { body {
margin: 0; margin: 0;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue",
sans-serif; sans-serif;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
background-color: #eeeeee;
} }
code { code {
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New",
monospace; monospace;
} }
.ListElement {
background-color: #073b4c;
width: 800px;
height: 45px;
position: relative;
top: 250px;
left: 100px;
margin-bottom: 10px;
color: #eeeeee;
}

View File

@ -1,13 +1,13 @@
import React from "react"; import React from "react";
import ReactDOM from "react-dom"; import ReactDOM from "react-dom";
import "./index.css"; import "./index.css";
import ListElement from "./list_component"; import ListElement from "./components/list_component";
ReactDOM.render( ReactDOM.render(
<React.StrictMode> <React.StrictMode>
<ListElement /> <ListElement name="Weekend Warmup" competitors="16" date="29.04.2022" />
<ListElement /> <ListElement name="Saturday Showdown" competitors="8" date="30.04.2022" />
<ListElement /> <ListElement name="Sunday Funday" competitors="64" date="01.05.2022" />
</React.StrictMode>, </React.StrictMode>,
document.getElementById("root") document.getElementById("root")
); );

View File

@ -1,14 +0,0 @@
import React from "react";
import ReactDOM from "react-dom";
export default class ListElement extends React.Component {
render() {
return (
<>
<div>Turnering 1, deltakere, Dato</div>
</>
);
}
}
ReactDOM.render(<Hello />, document.getElementById("root"));