Skip to content

Commit 0d9eab0

Browse files
committed
get rid of styled component
1 parent 034d8be commit 0d9eab0

File tree

2 files changed

+16
-17
lines changed

2 files changed

+16
-17
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
@use "scss/variables";
2+
3+
.content {
4+
padding: 0 variables.$spacing-2xl 0 variables.$spacing-lg;
5+
}
6+
7+
.usageValue {
8+
padding-right: 10px;
9+
min-width: 53px;
10+
}

airbyte-webapp/src/packages/cloud/views/credits/CreditsPage/components/UsagePerConnectionTable.tsx

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ import React, { useCallback } from "react";
33
import { FormattedMessage, FormattedNumber } from "react-intl";
44
import { useNavigate } from "react-router-dom";
55
import { CellProps } from "react-table";
6-
import styled from "styled-components";
76

87
import { SortOrderEnum } from "components/EntityTable/types";
98
import { Table, SortableTableHeader } from "components/ui/Table";
9+
import { Text } from "components/ui/Text";
1010

1111
import { useQuery } from "hooks/useQuery";
1212
import { CreditConsumptionByConnector } from "packages/cloud/lib/domain/cloudWorkspaces/types";
@@ -15,18 +15,7 @@ import { useSourceDefinitionList } from "services/connector/SourceDefinitionServ
1515

1616
import ConnectionCell from "./ConnectionCell";
1717
import UsageCell from "./UsageCell";
18-
19-
const Content = styled.div`
20-
padding: 0 60px 0 15px;
21-
`;
22-
23-
const UsageValue = styled.div`
24-
font-weight: 500;
25-
font-size: 14px;
26-
line-height: 17px;
27-
padding-right: 10px;
28-
min-width: 53px;
29-
`;
18+
import styles from "./UsagePerConnectionTable.module.scss";
3019

3120
interface UsagePerConnectionTableProps {
3221
creditConsumption: CreditConsumptionByConnector[];
@@ -143,9 +132,9 @@ const UsagePerConnectionTable: React.FC<UsagePerConnectionTableProps> = ({ credi
143132
collapse: true,
144133
customPadding: { right: 0 },
145134
Cell: ({ cell }: CellProps<FullTableProps>) => (
146-
<UsageValue>
135+
<Text className={styles.usageValue} size="lg">
147136
<FormattedNumber value={cell.value} maximumFractionDigits={2} minimumFractionDigits={2} />
148-
</UsageValue>
137+
</Text>
149138
),
150139
},
151140
{
@@ -166,9 +155,9 @@ const UsagePerConnectionTable: React.FC<UsagePerConnectionTableProps> = ({ credi
166155
);
167156

168157
return (
169-
<Content>
158+
<div className={styles.content}>
170159
<Table columns={columns} data={sortingData} light />
171-
</Content>
160+
</div>
172161
);
173162
};
174163

0 commit comments

Comments
 (0)