add drag and drop support for addtagpopup

esc closes the popup
theme style is used
This commit is contained in:
2020-10-09 14:00:51 +00:00
parent 6076512dd0
commit 76f879a0f2
8 changed files with 235 additions and 92 deletions

View File

@ -33,7 +33,8 @@ export class SideBarItem extends React.Component {
render() {
const themeStyle = GlobalInfos.getThemeStyle();
return (
<div className={style.sidebarinfo + ' ' + themeStyle.thirdbackground + ' ' + themeStyle.lighttextcolor}>{this.props.children}</div>
<div
className={style.sidebarinfo + ' ' + themeStyle.thirdbackground + ' ' + themeStyle.lighttextcolor}>{this.props.children}</div>
);
}
}

View File

@ -1,5 +1,5 @@
import React from "react";
import SideBar from "./SideBar";
import SideBar, {SideBarItem, SideBarTitle} from "./SideBar";
import "@testing-library/jest-dom"
import {shallow} from "enzyme";
@ -14,4 +14,14 @@ describe('<SideBar/>', function () {
const wrapper = shallow(<SideBar>test</SideBar>);
expect(wrapper.children().text()).toBe("test");
});
it('sidebar Item renders without crashing', function () {
const wrapper = shallow(<SideBarItem>Test</SideBarItem>);
expect(wrapper.children().text()).toBe("Test");
});
it('renderes sidebartitle correctly', function () {
const wrapper = shallow(<SideBarTitle>Test</SideBarTitle>);
expect(wrapper.children().text()).toBe("Test");
});
});