PromucFlow_constructor/app/client/src/components/editorComponents/Sidebar.tsx
Abhinav Jha 70fea0e560
Feature: Add widgets from explorer (#464)
* Deprecate Navbar. Sidebar becomes a panelStack. It now has two panels, WidgetSidebar and Explorer

Co-authored-by: Nandan <nandan@thinkify.io>
2020-09-02 12:14:01 +05:30

35 lines
883 B
TypeScript

import React, { memo } from "react";
import styled from "styled-components";
import ExplorerSidebar from "pages/Editor/Explorer";
import { PanelStack, Classes } from "@blueprintjs/core";
import { Colors } from "constants/Colors";
const SidebarWrapper = styled.div`
background-color: ${Colors.MINE_SHAFT};
padding: 0px 0 0 6px;
width: ${props => props.theme.sidebarWidth};
color: ${props => props.theme.colors.textOnDarkBG};
overflow-y: auto;
& .${Classes.PANEL_STACK} {
height: 100%;
.${Classes.PANEL_STACK_VIEW} {
background: none;
}
}
`;
const initialPanel = { component: ExplorerSidebar };
export const Sidebar = memo(() => {
return (
<SidebarWrapper className="t--sidebar">
<PanelStack initialPanel={initialPanel} showPanelHeader={false} />
</SidebarWrapper>
);
});
Sidebar.displayName = "Sidebar";
export default Sidebar;