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,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

@ -0,0 +1,12 @@
import React from "react";
import "./SideBar.css"
class SideBar extends React.Component {
render() {
return (<div className='sideinfo'>
{this.props.children}
</div>);
}
}
export default SideBar;

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();
});
});