From ae0ce1f3d0ccf10c69a1b98eeb15b65e0651fc64 Mon Sep 17 00:00:00 2001 From: Joe Reuter Date: Wed, 18 Jan 2023 17:52:15 +0100 Subject: [PATCH 1/7] WIP --- .../Indicator/Indicator.module.scss | 12 +++ .../src/components/Indicator/Indicator.tsx | 21 ++++-- .../ReleaseStageBadge/ReleaseStageBadge.tsx | 2 +- airbyte-webapp/src/locales/en.json | 1 - .../components/ConnectorCell.module.scss | 5 ++ .../components/ConnectorCell.tsx | 44 ++--------- .../components/ConnectorsView.module.scss | 3 + .../components/ConnectorsView.tsx | 75 +++++++++++-------- .../ConnectorsPage/components/VersionCell.tsx | 45 +++++------ .../Connector/ConnectorForm/ConnectorForm.tsx | 3 +- 10 files changed, 113 insertions(+), 98 deletions(-) create mode 100644 airbyte-webapp/src/components/Indicator/Indicator.module.scss create mode 100644 airbyte-webapp/src/pages/SettingsPage/pages/ConnectorsPage/components/ConnectorCell.module.scss diff --git a/airbyte-webapp/src/components/Indicator/Indicator.module.scss b/airbyte-webapp/src/components/Indicator/Indicator.module.scss new file mode 100644 index 0000000000000..5ecd4ae36e4db --- /dev/null +++ b/airbyte-webapp/src/components/Indicator/Indicator.module.scss @@ -0,0 +1,12 @@ +@use "scss/colors"; + +.indicator { + height: 10px; + width: 10px; + border-radius: 50%; + background: colors.$red; +} + +.hidden { + background-color: transparent; +} diff --git a/airbyte-webapp/src/components/Indicator/Indicator.tsx b/airbyte-webapp/src/components/Indicator/Indicator.tsx index 7332a0017d736..6b684037f417f 100644 --- a/airbyte-webapp/src/components/Indicator/Indicator.tsx +++ b/airbyte-webapp/src/components/Indicator/Indicator.tsx @@ -1,8 +1,15 @@ -import styled from "styled-components"; +import classNames from "classnames"; -export const Indicator = styled.div` - height: 10px; - width: 10px; - border-radius: 50%; - background: ${({ theme }) => theme.dangerColor}; -`; +import styles from "./Indicator.module.scss"; + +export interface IndicatorProps { + /** + * Set to true to render an invisible indicator so reserve the space in the UI + */ + hidden?: boolean; + className?: string; +} + +export const Indicator: React.FC = ({ hidden, className }) => ( +