diff --git a/airbyte-webapp/src/components/MainPageWithScroll/MainPageWithScroll.module.scss b/airbyte-webapp/src/components/MainPageWithScroll/MainPageWithScroll.module.scss new file mode 100644 index 0000000000000..4bcec7f35c625 --- /dev/null +++ b/airbyte-webapp/src/components/MainPageWithScroll/MainPageWithScroll.module.scss @@ -0,0 +1,19 @@ +@use "../../scss/variables"; + +.page { + overflow-y: hidden; + height: 100%; + display: flex; + flex-direction: column; +} + +.headerError { + padding-top: 25px; +} + +.content { + overflow-y: auto; + padding-top: 17px; + height: 100%; + padding-bottom: variables.$defaultBottomMargin; +} diff --git a/airbyte-webapp/src/components/MainPageWithScroll/MainPageWithScroll.tsx b/airbyte-webapp/src/components/MainPageWithScroll/MainPageWithScroll.tsx index 64e0e51a82084..68d1970487b34 100644 --- a/airbyte-webapp/src/components/MainPageWithScroll/MainPageWithScroll.tsx +++ b/airbyte-webapp/src/components/MainPageWithScroll/MainPageWithScroll.tsx @@ -1,44 +1,29 @@ +import classnames from "classnames"; import React from "react"; -import styled from "styled-components"; -const Content = styled.div` - overflow-y: auto; - padding-top: 17px; - height: 100%; -`; - -const Header = styled.div<{ hasError?: boolean }>` - padding-top: ${({ hasError }) => (hasError ? 25 : 0)}px; -`; - -const Page = styled.div` - overflow-y: hidden; - height: 100%; - display: flex; - flex-direction: column; -`; +import styles from "./MainPageWithScroll.module.scss"; /** * @param headTitle the title shown in the browser toolbar * @param pageTitle the title shown on the page */ -interface IProps { +interface MainPageWithScrollProps { error?: React.ReactNode; headTitle?: React.ReactNode; pageTitle?: React.ReactNode; children?: React.ReactNode; } -const MainPageWithScroll: React.FC = ({ error, headTitle, pageTitle, children }) => { +const MainPageWithScroll: React.FC = ({ error, headTitle, pageTitle, children }) => { return ( - +
{error} -
+
{headTitle} {pageTitle} -
- {children} - +
+
{children}
+ ); }; diff --git a/airbyte-webapp/src/pages/DestinationPage/pages/DestinationItemPage/components/DestinationSettings.module.scss b/airbyte-webapp/src/pages/DestinationPage/pages/DestinationItemPage/components/DestinationSettings.module.scss new file mode 100644 index 0000000000000..69ad20e5307ea --- /dev/null +++ b/airbyte-webapp/src/pages/DestinationPage/pages/DestinationItemPage/components/DestinationSettings.module.scss @@ -0,0 +1,5 @@ +.content { + width: 80%; + max-width: 813px; + margin: 18px auto; +} diff --git a/airbyte-webapp/src/pages/DestinationPage/pages/DestinationItemPage/components/DestinationSettings.tsx b/airbyte-webapp/src/pages/DestinationPage/pages/DestinationItemPage/components/DestinationSettings.tsx index 05ffcb126792a..ceef6d9a7a3e2 100644 --- a/airbyte-webapp/src/pages/DestinationPage/pages/DestinationItemPage/components/DestinationSettings.tsx +++ b/airbyte-webapp/src/pages/DestinationPage/pages/DestinationItemPage/components/DestinationSettings.tsx @@ -1,6 +1,5 @@ import React from "react"; import { FormattedMessage } from "react-intl"; -import styled from "styled-components"; import DeleteBlock from "components/DeleteBlock"; @@ -12,11 +11,7 @@ import { useDestinationDefinition } from "services/connector/DestinationDefiniti import { useGetDestinationDefinitionSpecification } from "services/connector/DestinationDefinitionSpecificationService"; import { ConnectorCard } from "views/Connector/ConnectorCard"; -const Content = styled.div` - max-width: 813px; - width: 80%; - margin: 19px auto; -`; +import styles from "./DestinationSettings.module.scss"; interface DestinationsSettingsProps { currentDestination: DestinationRead; @@ -52,7 +47,7 @@ const DestinationsSettings: React.FC = ({ }); return ( - +
= ({ title={} /> - +
); }; diff --git a/airbyte-webapp/src/pages/SourcesPage/pages/SourceItemPage/components/SourceSettings.module.scss b/airbyte-webapp/src/pages/SourcesPage/pages/SourceItemPage/components/SourceSettings.module.scss new file mode 100644 index 0000000000000..69ad20e5307ea --- /dev/null +++ b/airbyte-webapp/src/pages/SourcesPage/pages/SourceItemPage/components/SourceSettings.module.scss @@ -0,0 +1,5 @@ +.content { + width: 80%; + max-width: 813px; + margin: 18px auto; +} diff --git a/airbyte-webapp/src/pages/SourcesPage/pages/SourceItemPage/components/SourceSettings.tsx b/airbyte-webapp/src/pages/SourcesPage/pages/SourceItemPage/components/SourceSettings.tsx index 54abe136ade53..9f7158649f07f 100644 --- a/airbyte-webapp/src/pages/SourcesPage/pages/SourceItemPage/components/SourceSettings.tsx +++ b/airbyte-webapp/src/pages/SourcesPage/pages/SourceItemPage/components/SourceSettings.tsx @@ -1,6 +1,5 @@ import React, { useEffect } from "react"; import { FormattedMessage } from "react-intl"; -import styled from "styled-components"; import DeleteBlock from "components/DeleteBlock"; @@ -12,11 +11,7 @@ import { useGetSourceDefinitionSpecification } from "services/connector/SourceDe import { ConnectorCard } from "views/Connector/ConnectorCard"; import { useDocumentationPanelContext } from "views/Connector/ConnectorDocumentationLayout/DocumentationPanelContext"; -const Content = styled.div` - max-width: 813px; - width: 80%; - margin: 18px auto; -`; +import styles from "./SourceSettings.module.scss"; interface SourceSettingsProps { currentSource: SourceRead; @@ -52,7 +47,7 @@ const SourceSettings: React.FC = ({ currentSource, connecti const onDelete = () => deleteSource({ connectionsWithSource, source: currentSource }); return ( - +
} isEditMode @@ -67,7 +62,7 @@ const SourceSettings: React.FC = ({ currentSource, connecti selectedConnectorDefinitionSpecification={sourceDefinitionSpecification} /> - +
); }; diff --git a/airbyte-webapp/src/scss/_variables.scss b/airbyte-webapp/src/scss/_variables.scss index 6e21721b3bfa2..176700055c793 100644 --- a/airbyte-webapp/src/scss/_variables.scss +++ b/airbyte-webapp/src/scss/_variables.scss @@ -1 +1,2 @@ $transition: 0.3s; +$defaultBottomMargin: 150px; diff --git a/airbyte-webapp/src/views/Connector/ConnectorDocumentationLayout/ConnectorDocumentationLayout.module.css b/airbyte-webapp/src/views/Connector/ConnectorDocumentationLayout/ConnectorDocumentationLayout.module.scss similarity index 69% rename from airbyte-webapp/src/views/Connector/ConnectorDocumentationLayout/ConnectorDocumentationLayout.module.css rename to airbyte-webapp/src/views/Connector/ConnectorDocumentationLayout/ConnectorDocumentationLayout.module.scss index dc00e3a3a1985..524edac650a35 100644 --- a/airbyte-webapp/src/views/Connector/ConnectorDocumentationLayout/ConnectorDocumentationLayout.module.css +++ b/airbyte-webapp/src/views/Connector/ConnectorDocumentationLayout/ConnectorDocumentationLayout.module.scss @@ -1,3 +1,6 @@ +@use "../../../scss/colors"; +@use "../../../scss/variables"; + .leftPanelStyle { min-width: 200px; position: relative; @@ -18,6 +21,10 @@ padding: 400px 30px 30px 30px; } +.container > *:last-child { + padding-bottom: variables.$defaultBottomMargin; +} + .noScroll { overflow: hidden; max-height: 100%; @@ -45,3 +52,15 @@ transform: rotate(-90deg); white-space: nowrap; } + +.panelGrabber { + height: 100vh; + padding: 6px; + display: flex; +} + +.grabberHandleIcon { + margin: auto; + height: 25px; + color: colors.$greyColor20; +} diff --git a/airbyte-webapp/src/views/Connector/ConnectorDocumentationLayout/ConnectorDocumentationLayout.tsx b/airbyte-webapp/src/views/Connector/ConnectorDocumentationLayout/ConnectorDocumentationLayout.tsx index 26bfefe45b0f6..2d39122d44237 100644 --- a/airbyte-webapp/src/views/Connector/ConnectorDocumentationLayout/ConnectorDocumentationLayout.tsx +++ b/airbyte-webapp/src/views/Connector/ConnectorDocumentationLayout/ConnectorDocumentationLayout.tsx @@ -1,26 +1,15 @@ import { faGripLinesVertical } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; +import classNames from "classnames"; import React from "react"; import { FormattedMessage } from "react-intl"; import { ReflexContainer, ReflexElement, ReflexSplitter } from "react-reflex"; import { useWindowSize } from "react-use"; -import styled from "styled-components"; -import { DocumentationPanel } from "../../../components/DocumentationPanel/DocumentationPanel"; -import styles from "./ConnectorDocumentationLayout.module.css"; -import { useDocumentationPanelContext } from "./DocumentationPanelContext"; - -const PanelGrabber = styled.div` - height: 100vh; - padding: 6px; - display: flex; -`; +import { DocumentationPanel } from "components/DocumentationPanel"; -const GrabberHandle = styled(FontAwesomeIcon)` - margin: auto; - height: 25px; - color: ${({ theme }) => theme.greyColor20}; -`; +import styles from "./ConnectorDocumentationLayout.module.scss"; +import { useDocumentationPanelContext } from "./DocumentationPanelContext"; interface PanelContainerProps { dimensions?: { @@ -42,7 +31,14 @@ const LeftPanelContainer: React.FC> )} -
{children}
{" "} +
550, + })} + > + {children} +
); }; @@ -53,7 +49,7 @@ const RightPanelContainer: React.FC return ( <> {width < 350 ? ( -
+

Setup Guide

) : ( @@ -70,14 +66,14 @@ export const ConnectorDocumentationLayout: React.FC = ({ children }) => { return ( - + {children} {documentationPanelOpen && ( - - - +
+ +
)} {screenWidth > 500 && documentationPanelOpen && (