ISSUE-005 - Added a scrolling effect to the PreviewWindow. Added scroll functionality to overflow-y for the WorkspaceList box.

This commit is contained in:
Kyle Geib committed 2022-01-07 19:00:16 -05:00
1 parent ab4c8eefa6
commit 7c2654ba51
6 files changed
+61 -12

No files matched your search

@@ -4,8 +4,11 @@ import { NavLink } from "react-router-dom";
import { MenuItem } from "../../Common/MenuItem.styled";
import { workspaceList } from "../workspaces";
export const WorkspaceList = () => (
<WorkspaceListBox>
type WorkspaceListProps = {
headerOffset?: number,
};
export const WorkspaceList = ({ headerOffset }: WorkspaceListProps) => (
<WorkspaceListBox headerOffset={headerOffset}>
<Stack as="ul" gutter="md">
{workspaceList.map((workspace, i) => (
<WorkspaceListNavLink key={i} to={workspace.id} label={workspace.name} />
@@ -1,11 +1,16 @@
import styled from "styled-components";
import { PadBox } from "@bedrock-layout/padbox";
type WorkspaceListBoxProps = {
headerOffset?: number,
};
export const WorkspaceListBox = styled(PadBox).attrs(() => ({
padding: ["lg", "md"],
}))`
height: 100%;
}))<WorkspaceListBoxProps>`
height: calc(100vh - ${({ headerOffset = 0 }) => `${headerOffset}px`});
width: 100%;
background-image: linear-gradient(to bottom, #f0f0f0, #fff);
border-right: 1px solid ${p => p.theme.colors.darkGrey};
overflow-y: scroll;
`;
WorkspaceListBox.displayName = "WorkspaceListBox";