Added css and dates for list elements
This commit is contained in:
parent
8e90a7ac37
commit
d72640ab4a
|
@ -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>
|
||||
);
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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(
|
||||
<React.StrictMode>
|
||||
<ListElement />
|
||||
<ListElement />
|
||||
<ListElement />
|
||||
<ListElement name="Weekend Warmup" competitors="16" date="29.04.2022" />
|
||||
<ListElement name="Saturday Showdown" competitors="8" date="30.04.2022" />
|
||||
<ListElement name="Sunday Funday" competitors="64" date="01.05.2022" />
|
||||
</React.StrictMode>,
|
||||
document.getElementById("root")
|
||||
);
|
||||
|
|
|
@ -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"));
|
Loading…
Reference in New Issue