Skip to content

Commit

Permalink
fix:scrollbar disappearing
Browse files Browse the repository at this point in the history
  • Loading branch information
Gustav-Eikaas committed Nov 22, 2023
1 parent e75f4ba commit ad538a9
Showing 1 changed file with 8 additions and 17 deletions.
25 changes: 8 additions & 17 deletions packages/workspace-react/src/lib/components/Workspace.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,13 @@ export function Workspace({ tabs, defaultTab, Sidesheet = () => <></>, providers
<TabsProvider.Provider value={tabs}>
<EventHandler {...events}>
<ContextProviders providers={providers}>
<StyledSidesheetWrapper>
<StyledLayoutWrapper>
<WorkspaceHeader />
<WorkspaceBody />
<StyledSurroundingSidesheet id="sidesheet-workspace-wrapper">
<Sidesheet />
</StyledSurroundingSidesheet>
</StyledLayoutWrapper>
</StyledSidesheetWrapper>
<StyledLayoutWrapper>
<WorkspaceHeader />
<WorkspaceBody />
<StyledSidesheetWrapper id="sidesheet-workspace-wrapper">
<Sidesheet />
</StyledSidesheetWrapper>
</StyledLayoutWrapper>
</ContextProviders>
</EventHandler>
</TabsProvider.Provider>
Expand All @@ -55,7 +53,7 @@ export function Workspace({ tabs, defaultTab, Sidesheet = () => <></>, providers
);
}

const StyledSurroundingSidesheet = styled.div`
const StyledSidesheetWrapper = styled.div`
grid-area: 1 / 2 / span 2;
background: white;
z-index: 2;
Expand All @@ -69,13 +67,6 @@ const StyledLayoutWrapper = styled.div`
width: 100%;
`;

const StyledSidesheetWrapper = styled.div`
height: 100%;
width: 100%;
display: grid;
grid-template-columns: minmax(0px, 1fr) auto; /* set two equal-width columns */
`;

const EventHandler = (props: PropsWithChildren<WorkspaceEvents>) => {
const { activeTab, setActiveTab } = useTabContext((s) => s);
const tabs = useContext(TabsProvider);
Expand Down

0 comments on commit ad538a9

Please sign in to comment.