@setoelkahfi / svara / commits / e53600a

App restructure

mellobacon committed Nov 24, 2022 at 23:41 UTC e53600af755dad0996b074a43d848f2b84f1002d
1 file changed +3 -28
src/App.svelte
+3 -28
@@ -5,23 +5,16 @@
5 import "carbon-components-svelte/css/g100.css";
6 import { Pane, Splitpanes } from 'svelte-splitpanes';
7 import SidebarView from "./components/Sidebar/SidebarView.svelte";
8 - import { showtabview, sidebartab } from "./components/Sidebar/Sidebar";
8 + import { showsidebarview, tool } from "./components/Sidebar/Sidebar";
9 </script>
10
11 <Header />
12 <div id="main">
13 <Sidebar />
14 <Splitpanes theme="editor-pane">
15 - {#if $showtabview}
15 + {#if $showsidebarview}
16 <Pane size={25} snapSize={5}>
17 - <SidebarView>
18 - <div class="sidebarheader">
19 - <span>{$sidebartab.tabname}</span>
20 - </div>
21 - <div class="sidebarcontent">
22 - <svelte:component this={$sidebartab.content}></svelte:component>
23 - </div>
24 - </SidebarView>
17 + <SidebarView title={$tool.tabname} content={$tool.content}></SidebarView>
18 </Pane>
19 {/if}
20 <Pane>
@@ -34,22 +27,4 @@
27 display: flex;
28 height: calc(100% - 2rem);
29 }
37 - .sidebarheader {
38 - display: flex;
39 - align-items: center;
40 - justify-content: center;
41 - width: 100%;
42 - min-height: 2rem;
43 - border-bottom: 1px solid #333;
44 - }
45 - .sidebarcontent {
46 - width: 100%;
47 - overflow-y: auto;
48 - }
49 - .sidebarcontent::-webkit-scrollbar {
50 - width: 12px;
51 - }
52 - .sidebarcontent::-webkit-scrollbar-thumb {
53 - background-color: #4c4c4c38;;
54 - }
30 </style>
\ No newline at end of file