From eaa8adbaf277051f20fca5b6c4f816af94ba9cf6 Mon Sep 17 00:00:00 2001 From: Christopher Berge Hove Date: Mon, 5 Aug 2024 14:07:49 +0200 Subject: [PATCH] fix: remove global side-sheet style to custom wrapper for portal side sheets --- .../components/portal-side-sheet/PortalSideSheet.tsx | 11 ++++++++++- .../portal-ui/src/style-provider/globalStyles.ts | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/client/packages/portal-client/src/components/portal-side-sheet/PortalSideSheet.tsx b/client/packages/portal-client/src/components/portal-side-sheet/PortalSideSheet.tsx index 03c229620..af5496c64 100644 --- a/client/packages/portal-client/src/components/portal-side-sheet/PortalSideSheet.tsx +++ b/client/packages/portal-client/src/components/portal-side-sheet/PortalSideSheet.tsx @@ -1,6 +1,11 @@ import { PortalAction, usePortalActions } from '@equinor/portal-core'; import { useEffect, useState } from 'react'; +import styled from 'styled-components'; + +const SideSheetWrapper = styled.div` + --custom-header-height: 0px; +`; export function PortalSideSheet() { const [portalAction, setPortalAction] = useState(); @@ -16,7 +21,11 @@ export function PortalSideSheet() { const Component = portalAction?.component; if (portalAction && Component) { - return ; + return ( + + {' '} + + ); } return null; } diff --git a/client/packages/portal-ui/src/style-provider/globalStyles.ts b/client/packages/portal-ui/src/style-provider/globalStyles.ts index 079996202..3b7641b87 100644 --- a/client/packages/portal-ui/src/style-provider/globalStyles.ts +++ b/client/packages/portal-ui/src/style-provider/globalStyles.ts @@ -7,7 +7,7 @@ export const GlobalStyle = createGlobalStyle` --custom-header-height: 0px; --custom-side-sheet-height: 100% --portal-header-height: 48px; - } + } body { font-family: Equinor, sans-serif;