From 9954acbf6c7782068b9c0e25c4beb988af7df909 Mon Sep 17 00:00:00 2001 From: Joey Marshment-Howell Date: Wed, 2 Nov 2022 09:40:44 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=AA=9F=F0=9F=94=A7=20Remove=20styled=20co?= =?UTF-8?q?mponents=20(round=201)=20(#18766)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * refactor EditorHeader (untested) * refactor BaseClearView * delete unused Subtitle * refactor ConfirmationModal * refactor Arrow * refactor BulkHeader * refactor CatalogTreeSearch * refactor StreamFieldTable * refactor StreamHeader * refactor ConnectorIcon * refactor TreeRowWrapper * refactor DeleteBlock * refactor EmptyResourceBlock * revert unintended element change --- .../components/EditorHeader.module.scss | 13 +++++++ .../components/EditorHeader.tsx | 17 ++------ .../ConfirmationModal.module.scss | 13 +++++++ .../ConfirmationModal/ConfirmationModal.tsx | 22 ++--------- .../ConnectorIcon/ConnectorIcon.module.scss | 5 +++ .../common/ConnectorIcon/ConnectorIcon.tsx | 15 +++---- .../DeleteBlock/DeleteBlock.module.scss | 16 ++++++++ .../common/DeleteBlock/DeleteBlock.tsx | 27 +++---------- .../EmptyResourceBlock.module.scss | 27 +++++++++++++ .../EmptyResourceBlock/EmptyResourceBlock.tsx | 39 ++++--------------- .../BaseClearView.module.scss | 22 +++++++++++ .../PageViewContainer/BaseClearView.tsx | 35 +++-------------- .../connection/CatalogTree/Arrow.module.scss | 19 +++++++++ .../connection/CatalogTree/Arrow.tsx | 31 ++++++--------- .../CatalogTree/BulkHeader.module.scss | 13 +++++++ .../connection/CatalogTree/BulkHeader.tsx | 20 ++-------- .../CatalogTree/CatalogTreeSearch.module.scss | 12 ++++++ .../CatalogTree/CatalogTreeSearch.tsx | 23 +++-------- .../CatalogTree/StreamFieldTable.module.scss | 7 ++++ .../CatalogTree/StreamFieldTable.tsx | 12 ++---- .../CatalogTree/StreamHeader.module.scss | 4 ++ .../connection/CatalogTree/StreamHeader.tsx | 9 +---- .../CatalogTree/TreeRowWrapper.module.scss | 20 ++++++++++ .../connection/CatalogTree/TreeRowWrapper.tsx | 28 +++++-------- 24 files changed, 239 insertions(+), 210 deletions(-) create mode 100644 airbyte-webapp/src/components/ArrayOfObjectsEditor/components/EditorHeader.module.scss create mode 100644 airbyte-webapp/src/components/common/ConnectorIcon/ConnectorIcon.module.scss create mode 100644 airbyte-webapp/src/components/common/DeleteBlock/DeleteBlock.module.scss create mode 100644 airbyte-webapp/src/components/common/EmptyResourceBlock/EmptyResourceBlock.module.scss create mode 100644 airbyte-webapp/src/components/common/PageViewContainer/BaseClearView.module.scss create mode 100644 airbyte-webapp/src/components/connection/CatalogTree/Arrow.module.scss create mode 100644 airbyte-webapp/src/components/connection/CatalogTree/CatalogTreeSearch.module.scss create mode 100644 airbyte-webapp/src/components/connection/CatalogTree/StreamFieldTable.module.scss create mode 100644 airbyte-webapp/src/components/connection/CatalogTree/TreeRowWrapper.module.scss diff --git a/airbyte-webapp/src/components/ArrayOfObjectsEditor/components/EditorHeader.module.scss b/airbyte-webapp/src/components/ArrayOfObjectsEditor/components/EditorHeader.module.scss new file mode 100644 index 000000000000..834c58a237ea --- /dev/null +++ b/airbyte-webapp/src/components/ArrayOfObjectsEditor/components/EditorHeader.module.scss @@ -0,0 +1,13 @@ +@use "scss/colors"; + +.editorHeader { + display: flex; + justify-content: space-between; + align-items: center; + flex-direction: row; + color: colors.$dark-blue-900; + font-weight: 500; + font-size: 14px; + line-height: 17px; + margin: 5px 0 10px; +} diff --git a/airbyte-webapp/src/components/ArrayOfObjectsEditor/components/EditorHeader.tsx b/airbyte-webapp/src/components/ArrayOfObjectsEditor/components/EditorHeader.tsx index 55a49eb0c42c..f6990cd45702 100644 --- a/airbyte-webapp/src/components/ArrayOfObjectsEditor/components/EditorHeader.tsx +++ b/airbyte-webapp/src/components/ArrayOfObjectsEditor/components/EditorHeader.tsx @@ -1,22 +1,11 @@ import React from "react"; import { FormattedMessage } from "react-intl"; -import styled from "styled-components"; import { Button } from "components/ui/Button"; import { ConnectionFormMode } from "hooks/services/ConnectionForm/ConnectionFormService"; -const Content = styled.div` - display: flex; - justify-content: space-between; - align-items: center; - flex-direction: row; - color: ${({ theme }) => theme.textColor}; - font-weight: 500; - font-size: 14px; - line-height: 17px; - margin: 5px 0 10px; -`; +import styles from "./EditorHeader.module.scss"; interface EditorHeaderProps { mainTitle?: React.ReactNode; @@ -36,14 +25,14 @@ const EditorHeader: React.FC = ({ disabled, }) => { return ( - +
{mainTitle || } {mode !== "readonly" && ( )} - +
); }; diff --git a/airbyte-webapp/src/components/common/ConfirmationModal/ConfirmationModal.module.scss b/airbyte-webapp/src/components/common/ConfirmationModal/ConfirmationModal.module.scss index 86081ff47b39..4f7c81dcc15d 100644 --- a/airbyte-webapp/src/components/common/ConfirmationModal/ConfirmationModal.module.scss +++ b/airbyte-webapp/src/components/common/ConfirmationModal/ConfirmationModal.module.scss @@ -1,3 +1,16 @@ .buttonWithMargin { margin-right: 12px; } + +.content { + width: 585px; + font-size: 14px; + padding: 25px; + white-space: pre-line; +} + +.buttonContent { + margin-top: 26px; + display: flex; + justify-content: flex-end; +} diff --git a/airbyte-webapp/src/components/common/ConfirmationModal/ConfirmationModal.tsx b/airbyte-webapp/src/components/common/ConfirmationModal/ConfirmationModal.tsx index 4f09c55badda..2b45d4333b88 100644 --- a/airbyte-webapp/src/components/common/ConfirmationModal/ConfirmationModal.tsx +++ b/airbyte-webapp/src/components/common/ConfirmationModal/ConfirmationModal.tsx @@ -1,6 +1,5 @@ import React from "react"; import { FormattedMessage } from "react-intl"; -import styled from "styled-components"; import { Button } from "components/ui/Button"; import { Modal } from "components/ui/Modal"; @@ -8,19 +7,6 @@ import { Modal } from "components/ui/Modal"; import useLoadingState from "../../../hooks/useLoadingState"; import styles from "./ConfirmationModal.module.scss"; -const Content = styled.div` - width: 585px; - font-size: 14px; - padding: 25px; - white-space: pre-line; -`; - -const ButtonContent = styled.div` - margin-top: 26px; - display: flex; - justify-content: flex-end; -`; - export interface ConfirmationModalProps { onClose: () => void; title: string; @@ -45,9 +31,9 @@ export const ConfirmationModal: React.FC = ({ return ( }> - +
- +
- - +
+
); }; diff --git a/airbyte-webapp/src/components/common/ConnectorIcon/ConnectorIcon.module.scss b/airbyte-webapp/src/components/common/ConnectorIcon/ConnectorIcon.module.scss new file mode 100644 index 000000000000..7e0592687e48 --- /dev/null +++ b/airbyte-webapp/src/components/common/ConnectorIcon/ConnectorIcon.module.scss @@ -0,0 +1,5 @@ +.content { + height: 25px; + width: 25px; + overflow: hidden; +} diff --git a/airbyte-webapp/src/components/common/ConnectorIcon/ConnectorIcon.tsx b/airbyte-webapp/src/components/common/ConnectorIcon/ConnectorIcon.tsx index a62a90c7cdbf..9f4012e48522 100644 --- a/airbyte-webapp/src/components/common/ConnectorIcon/ConnectorIcon.tsx +++ b/airbyte-webapp/src/components/common/ConnectorIcon/ConnectorIcon.tsx @@ -1,22 +1,17 @@ import React from "react"; -import styled from "styled-components"; import { getIcon } from "utils/imageUtils"; +import styles from "./ConnectorIcon.module.scss"; + interface Props { icon?: string; className?: string; small?: boolean; } -export const Content = styled.div` - height: 25px; - width: 25px; - overflow: hidden; -`; - -export const ConnectorIcon: React.FC = ({ icon, className }) => ( -