diff --git a/airbyte-webapp/src/components/DocumentationPanel/DocumentationPanel.module.scss b/airbyte-webapp/src/components/DocumentationPanel/DocumentationPanel.module.scss index b633547502a2e..00bd408cd9da2 100644 --- a/airbyte-webapp/src/components/DocumentationPanel/DocumentationPanel.module.scss +++ b/airbyte-webapp/src/components/DocumentationPanel/DocumentationPanel.module.scss @@ -1,11 +1,11 @@ @use "../../scss/colors"; .container { - padding: 0px 0px 20px; - background-color: colors.$white; min-height: 100vh; + padding-bottom: 40px; + background-color: colors.$white; } .content { - padding: 0px 35px 20px; + padding: 0 35px; } diff --git a/airbyte-webapp/src/packages/cloud/views/layout/MainView/MainView.module.scss b/airbyte-webapp/src/packages/cloud/views/layout/MainView/MainView.module.scss new file mode 100644 index 0000000000000..f7b8ce4a4c4f0 --- /dev/null +++ b/airbyte-webapp/src/packages/cloud/views/layout/MainView/MainView.module.scss @@ -0,0 +1,29 @@ +$banner-height: 30px; + +.mainContainer { + overflow: hidden; + display: flex; + flex-direction: row; + width: 100%; + height: 100%; + min-height: 680px; + + .content { + overflow-y: auto; + width: 100%; + height: 100%; + + .dataBlock { + width: 100%; + height: 100%; + } + + &.alertBanner { + margin-top: $banner-height; + + .dataBlock { + height: calc(100% - #{$banner-height}); + } + } + } +} diff --git a/airbyte-webapp/src/packages/cloud/views/layout/MainView/MainView.tsx b/airbyte-webapp/src/packages/cloud/views/layout/MainView/MainView.tsx index 0383a09a6ac4b..9e01e6b0cd2dd 100644 --- a/airbyte-webapp/src/packages/cloud/views/layout/MainView/MainView.tsx +++ b/airbyte-webapp/src/packages/cloud/views/layout/MainView/MainView.tsx @@ -1,7 +1,7 @@ +import classNames from "classnames"; import React, { useMemo } from "react"; import { FormattedMessage, useIntl } from "react-intl"; import { Link, Outlet } from "react-router-dom"; -import styled from "styled-components"; import { LoadingPage } from "components"; import { AlertBanner } from "components/base/Banner/AlertBanner"; @@ -15,27 +15,7 @@ import { ResourceNotFoundErrorBoundary } from "views/common/ResorceNotFoundError import { StartOverErrorView } from "views/common/StartOverErrorView"; import { InsufficientPermissionsErrorBoundary } from "./InsufficientPermissionsErrorBoundary"; - -const MainContainer = styled.div` - width: 100%; - height: 100%; - overflow: hidden; - display: flex; - flex-direction: row; - min-height: 680px; -`; - -const Content = styled.div` - overflow-y: auto; - width: 100%; - height: 100%; -`; - -const DataBlock = styled.div<{ hasBanner?: boolean }>` - width: 100%; - height: 100%; - padding-top: ${({ hasBanner }) => (hasBanner ? 30 : 0)}px; -`; +import styles from "./MainView.module.scss"; const MainView: React.FC = (props) => { const { formatMessage } = useIntl(); @@ -79,19 +59,19 @@ const MainView: React.FC = (props) => { }, [alertToShow, cloudWorkspace, formatMessage]); return ( - +
}> - +
{alertToShow && } - +
}> }>{props.children ?? } - - +
+
- +
); }; diff --git a/airbyte-webapp/src/views/Connector/ConnectorDocumentationLayout/ConnectorDocumentationLayout.tsx b/airbyte-webapp/src/views/Connector/ConnectorDocumentationLayout/ConnectorDocumentationLayout.tsx index 3595bc354543f..a4058e0dc0ba1 100644 --- a/airbyte-webapp/src/views/Connector/ConnectorDocumentationLayout/ConnectorDocumentationLayout.tsx +++ b/airbyte-webapp/src/views/Connector/ConnectorDocumentationLayout/ConnectorDocumentationLayout.tsx @@ -58,7 +58,7 @@ export const ConnectorDocumentationLayout: React.FC = ({ children }) => { const screenWidth = useWindowSize().width; return ( - + {children}