added treeview dependency

This commit is contained in:
Xetera
2019-07-27 15:52:25 -04:00
committed by Jean-Philippe Sirois
parent 80f91b5dc1
commit 378bb7d4db
8 changed files with 70 additions and 2 deletions
+20 -1
View File
@@ -1,5 +1,24 @@
import React from "react";
import { SidebarScroller } from "./style";
import Tree from "react-treeview";
const Sidebar = () => { }
const makeTree = () => {
}
const Sidebar = () => {
return (
<Tree
nodeLabel={<div>"Javascript"</div>}
>
<Tree
nodeLabel={<div>"Javascript"</div>}
>
Test
</Tree>
</Tree>
)
}
export default Sidebar;
+6
View File
@@ -0,0 +1,6 @@
import styled from "styled-components";
export const SidebarScroller = styled.div`
display: flex;
flex-direction: column;
`
@@ -0,0 +1,17 @@
import React from "react";
import { SidebarTitle } from "./style";
export interface SidebarSectionProps {
readonly title: string;
}
const SidebarSection = ({ title, children }: React.PropsWithChildren<SidebarSectionProps>) => {
return (
<div>
<SidebarTitle>{title}</SidebarTitle>
{children}
</div>
)
}
export default SidebarSection;
@@ -0,0 +1,5 @@
import styled from "styled-components";
export const SidebarTitle = styled.h3`
text-transform: uppercase;
`;