some reformattings

added badges
This commit is contained in:
2020-06-09 23:22:43 +02:00
parent 83823dceab
commit bb18a62a3d
14 changed files with 53 additions and 11 deletions

View File

@ -0,0 +1,17 @@
import React from "react";
import ReactDom from 'react-dom'
import {render, cleanup} from '@testing-library/react'
import "@testing-library/jest-dom"
import AddTagPopup from "./AddTagPopup";
afterEach(cleanup);
describe('<AddTagPopup/>', function () {
it('renders without crashing ', function () {
const div = document.createElement("div");
ReactDom.render(<AddTagPopup/>,div);
ReactDom.unmountComponentAtNode(div);
});
});

View File

@ -0,0 +1,24 @@
.sideinfo {
width: 20%;
float: left;
padding: 20px;
margin-top: 25px;
margin-left: 15px;
background-color: #b4c7fe;
border-radius: 20px;
border: 2px #3574fe solid;
overflow: hidden;
}
.sidebartitle {
font-weight: bold;
font-size: larger;
}
.sidebarinfo {
margin-top: 5px;
background-color: #8ca3fc;
border-radius: 5px;
padding: 2px 10px 2px 15px;
width: 220px;
}

View File

@ -1,5 +1,5 @@
import React from "react";
import "../css/SideBar.css"
import "./SideBar.css"
class SideBar extends React.Component {
render() {

View File

@ -0,0 +1,20 @@
import React from "react";
import ReactDom from 'react-dom'
import SideBar from "./SideBar";
import {render} from '@testing-library/react'
import "@testing-library/jest-dom"
describe('<SideBar/>', function () {
it('renders without crashing ', function () {
const div = document.createElement("div");
ReactDom.render(<SideBar/>,div);
ReactDom.unmountComponentAtNode(div);
});
it('renders childs correctly', function () {
const {getByText} = render(<SideBar>test</SideBar>);
const randomElement = getByText(/test/i);
expect(randomElement).toBeInTheDocument();
});
});

19
src/elements/Tag/Tag.css Normal file
View File

@ -0,0 +1,19 @@
.tagbtn {
color: white;
margin: 10px;
background-color: #3574fe;
border: none;
border-radius: 10px;
padding: 5px 15px 5px 15px;
/*font-weight: bold;*/
display: block;
}
.tagbtn:focus {
background-color: #004eff;
outline: none;
}
.tagbtn:hover {
background-color: #004eff;
}

View File

@ -1,6 +1,6 @@
import React from "react";
import "../css/Tag.css"
import "./Tag.css"
class Tag extends React.Component {