diff --git a/app/web/src/components/IdeSideBar/IdeSideBar.tsx b/app/web/src/components/IdeSideBar/IdeSideBar.tsx index 394d980..15e61d8 100644 --- a/app/web/src/components/IdeSideBar/IdeSideBar.tsx +++ b/app/web/src/components/IdeSideBar/IdeSideBar.tsx @@ -1,49 +1,6 @@ -import { ReactNode, useState } from 'react' -import { Link, routes } from '@redwoodjs/router' -import { Tab } from '@headlessui/react' -import Svg, { SvgNames } from 'src/components/Svg/Svg' - -interface SidebarConfigType { - name: string, - icon: SvgNames, - disabled: boolean, - panel: ReactNode | null, -} - -const sidebarTopConfig : SidebarConfigType[] = [ - { - name: 'Files', - icon: 'files', - disabled: false, - panel:

Some Files!

, - }, - { - name: 'GitHub', - icon: 'github', - disabled: false, - panel:

Le GitHub Integration™️

, - }, - { - name: 'Visibility', - icon: 'eye', - disabled: true, - panel: null, - }, -] - -const sidebarBottomConfig : SidebarConfigType[] = [ - { - name: 'Settings', - icon: 'gear', - disabled: true, - panel: null, - }, -] - -const combinedConfig = [ - ...sidebarTopConfig, - ...sidebarBottomConfig, -] +import { useState } from 'react' +import Svg from 'src/components/Svg/Svg' +import { sidebarTopConfig, sidebarBottomConfig, sidebarCombinedConfig } from './sidebarConfig' function TabToggle({ item, className = "", active, onChange, onClick }) { return ( @@ -79,8 +36,8 @@ const IdeSideBar = () => { } return ( -
-
+
+
{ sidebarTopConfig.map((topItem, i) => ( { ))}
- { combinedConfig.find(item => item.name === selectedTab)?.panel && ( -
- { combinedConfig.find(item => item.name === selectedTab).panel } + { sidebarCombinedConfig.find(item => item.name === selectedTab)?.panel && ( +
+

{ selectedTab }

+ { sidebarCombinedConfig.find(item => item.name === selectedTab).panel }
) }
diff --git a/app/web/src/index.css b/app/web/src/index.css index 0e17ea0..8a5dee5 100644 --- a/app/web/src/index.css +++ b/app/web/src/index.css @@ -40,6 +40,10 @@ .tabToggle.disabled { @apply text-ch-gray-550 cursor-not-allowed; } + + .sidebarContainer { + @apply p-2; + } }