forked from airbytehq/airbyte
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🪟🔧 Remove styled components (round 1) (airbytehq#18766)
* 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
- Loading branch information
Showing
24 changed files
with
239 additions
and
210 deletions.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
airbyte-webapp/src/components/ArrayOfObjectsEditor/components/EditorHeader.module.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
airbyte-webapp/src/components/common/ConfirmationModal/ConfirmationModal.module.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
airbyte-webapp/src/components/common/ConnectorIcon/ConnectorIcon.module.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.content { | ||
height: 25px; | ||
width: 25px; | ||
overflow: hidden; | ||
} |
15 changes: 5 additions & 10 deletions
15
airbyte-webapp/src/components/common/ConnectorIcon/ConnectorIcon.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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<Props> = ({ icon, className }) => ( | ||
<Content className={className} aria-hidden="true"> | ||
export const ConnectorIcon: React.FC<Props> = ({ icon }) => ( | ||
<div className={styles.content} aria-hidden="true"> | ||
{getIcon(icon)} | ||
</Content> | ||
</div> | ||
); |
16 changes: 16 additions & 0 deletions
16
airbyte-webapp/src/components/common/DeleteBlock/DeleteBlock.module.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
@use "scss/colors"; | ||
|
||
.deleteBlock { | ||
margin-top: 12px; | ||
padding: 19px 20px 20px; | ||
display: flex; | ||
align-items: center; | ||
justify-content: space-between; | ||
} | ||
|
||
.text { | ||
font-size: 11px; | ||
line-height: 13px; | ||
color: colors.$grey-300; | ||
white-space: pre-line; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
airbyte-webapp/src/components/common/EmptyResourceBlock/EmptyResourceBlock.module.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
@use "scss/colors"; | ||
|
||
.content { | ||
padding: 74px 0 111px; | ||
text-align: center; | ||
font-size: 20px; | ||
line-height: 27px; | ||
color: colors.$dark-blue-900; | ||
} | ||
|
||
.imgBlock { | ||
height: 80px; | ||
width: 80px; | ||
border-radius: 50%; | ||
background: colors.$grey-100; | ||
margin: 0 auto 10px; | ||
text-align: center; | ||
padding: 20px 0; | ||
} | ||
|
||
.description { | ||
font-weight: normal; | ||
font-size: 14px; | ||
line-height: 19px; | ||
color: colors.$grey-500; | ||
margin-top: 5px; | ||
} |
39 changes: 7 additions & 32 deletions
39
airbyte-webapp/src/components/common/EmptyResourceBlock/EmptyResourceBlock.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,18 @@ | ||
import React from "react"; | ||
import styled from "styled-components"; | ||
|
||
import styles from "./EmptyResourceBlock.module.scss"; | ||
|
||
interface EmptyResourceBlockProps { | ||
text: React.ReactNode; | ||
description?: React.ReactNode; | ||
} | ||
|
||
const Content = styled.div` | ||
padding: 74px 0 111px; | ||
text-align: center; | ||
font-size: 20px; | ||
line-height: 27px; | ||
color: ${({ theme }) => theme.textColor}; | ||
`; | ||
|
||
const ImgBlock = styled.div` | ||
height: 80px; | ||
width: 80px; | ||
border-radius: 50%; | ||
background: ${({ theme }) => theme.greyColor20}; | ||
margin: 0 auto 10px; | ||
text-align: center; | ||
padding: 20px 0; | ||
`; | ||
|
||
const Description = styled.div` | ||
font-weight: normal; | ||
font-size: 14px; | ||
line-height: 19px; | ||
color: ${({ theme }) => theme.greyColor60}; | ||
margin-top: 5px; | ||
`; | ||
|
||
export const EmptyResourceBlock: React.FC<EmptyResourceBlockProps> = ({ text, description }) => ( | ||
<Content> | ||
<ImgBlock> | ||
<div className={styles.content}> | ||
<div className={styles.imgBlock}> | ||
<img src="/cactus.png" height={40} alt="cactus" /> | ||
</ImgBlock> | ||
</div> | ||
{text} | ||
<Description>{description}</Description> | ||
</Content> | ||
<div className={styles.description}>{description}</div> | ||
</div> | ||
); |
22 changes: 22 additions & 0 deletions
22
airbyte-webapp/src/components/common/PageViewContainer/BaseClearView.module.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
.content { | ||
height: 100%; | ||
width: 100%; | ||
padding: 34px 0 13px; | ||
display: flex; | ||
align-items: center; | ||
flex-direction: column; | ||
justify-content: space-between; | ||
} | ||
|
||
.logoImg { | ||
width: 90px; | ||
height: 94px; | ||
margin-bottom: 20px; | ||
} | ||
|
||
.mainInfo { | ||
min-width: 550px; | ||
display: flex; | ||
align-items: center; | ||
flex-direction: column; | ||
} |
35 changes: 6 additions & 29 deletions
35
airbyte-webapp/src/components/common/PageViewContainer/BaseClearView.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,21 @@ | ||
import React from "react"; | ||
import { useIntl } from "react-intl"; | ||
import { Link } from "react-router-dom"; | ||
import styled from "styled-components"; | ||
|
||
import { Version } from "../Version"; | ||
|
||
const Content = styled.div` | ||
height: 100%; | ||
width: 100%; | ||
padding: 34px 0 13px; | ||
display: flex; | ||
align-items: center; | ||
flex-direction: column; | ||
justify-content: space-between; | ||
`; | ||
|
||
const LogoImg = styled.img` | ||
width: 90px; | ||
height: 94px; | ||
margin-bottom: 20px; | ||
`; | ||
|
||
const MainInfo = styled.div` | ||
min-width: 550px; | ||
display: flex; | ||
align-items: center; | ||
flex-direction: column; | ||
`; | ||
import styles from "./BaseClearView.module.scss"; | ||
|
||
export const BaseClearView: React.FC<React.PropsWithChildren<unknown>> = ({ children }) => { | ||
const { formatMessage } = useIntl(); | ||
return ( | ||
<Content> | ||
<MainInfo> | ||
<div className={styles.content}> | ||
<div className={styles.mainInfo}> | ||
<Link to=".."> | ||
<LogoImg src="/logo.png" alt={formatMessage({ id: "ui.goBack" })} /> | ||
<img className={styles.logoImg} src="/logo.png" alt={formatMessage({ id: "ui.goBack" })} /> | ||
</Link> | ||
{children} | ||
</MainInfo> | ||
</div> | ||
<Version /> | ||
</Content> | ||
</div> | ||
); | ||
}; |
Oops, something went wrong.