Skip to content

Commit

Permalink
feat: ✨ allow sidesheet draw over workspace header
Browse files Browse the repository at this point in the history
  • Loading branch information
Gustav-Eikaas committed Nov 22, 2023
1 parent 9b58d9f commit c505a58
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/workspace-fusion/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@equinor/workspace-fusion",
"version": "6.0.12",
"version": "6.0.13",
"type": "module",
"sideEffects": false,
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/workspace-react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@equinor/workspace-react",
"version": "1.0.4",
"version": "1.0.5",
"type": "module",
"sideEffects": false,
"license": "MIT",
Expand Down
22 changes: 19 additions & 3 deletions packages/workspace-react/src/lib/components/Workspace.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,13 @@ export function Workspace({ tabs, defaultTab, Sidesheet = () => <></>, providers
<EventHandler {...events}>
<ContextProviders providers={providers}>
<StyledSidesheetWrapper>
<div style={{ height: '100%', width: '100%', display: 'grid', gridTemplateRows: 'auto 1fr' }}>
<StyledLayoutWrapper>
<WorkspaceHeader />
<WorkspaceBody />
</div>
<Sidesheet />
<StyledSurroundingSidesheet id="sidesheet-workspace-wrapper">
<Sidesheet />
</StyledSurroundingSidesheet>
</StyledLayoutWrapper>
</StyledSidesheetWrapper>
</ContextProviders>
</EventHandler>
Expand All @@ -53,6 +55,20 @@ export function Workspace({ tabs, defaultTab, Sidesheet = () => <></>, providers
);
}

const StyledSurroundingSidesheet = styled.div`
grid-area: 1 / 2 / span 2;
background: white;
z-index: 2;
`;

const StyledLayoutWrapper = styled.div`
display: grid;
grid-template-rows: auto 1fr;
grid-template-columns: 1fr auto;
height: 100%;
width: 100%;
`;

const StyledSidesheetWrapper = styled.div`
height: 100%;
width: 100%;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,6 @@ const StyledWorkspaceHeader = styled.div`
padding-top: 5px;
overflow: hidden;
width: 100%;
grid-row: 1;
grid-column: 1 / span 2;
`;
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ export const StyledWorkspaceBody = styled.div`
flex-direction: row;
justify-content: space-between;
overflow: hidden;
grid-row: 2;
grid-column: 1;
`;

0 comments on commit c505a58

Please sign in to comment.