From c70c5a4a3c56ce4b9066937f85b82033d5f0924d Mon Sep 17 00:00:00 2001 From: jtpark Date: Thu, 24 Aug 2023 20:50:36 +0900 Subject: [PATCH] feat: Fix Swap pages --- .../components/common/icons/IconPolygon.tsx | 17 ++ .../components/common/icons/IconVector.tsx | 6 +- .../SwapButtonTooltip.spec.tsx | 2 - .../SwapButtonTooltip.stories.tsx | 17 +- .../SwapButtonTooltip.styles.ts | 12 ++ .../swap-button-tooltip/SwapButtonTooltip.tsx | 15 +- .../SwapCardAutoRouter.styles.ts | 21 ++- .../SwapCardAutoRouter.tsx | 39 ++--- .../SwapCardContentDetail.spec.tsx | 2 + .../SwapCardContentDetail.stories.tsx | 8 +- .../SwapCardContentDetail.styles.ts | 164 ++++-------------- .../SwapCardContentDetail.tsx | 91 +++++----- .../SwapCardContent.spec.tsx | 2 + .../SwapCardContent.stories.tsx | 2 + .../SwapCardContent.styles.ts | 37 +++- .../swap-card-content/SwapCardContent.tsx | 30 ++-- .../SwapCardFeeInfo.stories.tsx | 4 +- .../SwapCardFeeInfo.styles.ts | 96 +--------- .../swap-card-fee-info/SwapCardFeeInfo.tsx | 4 +- .../swap-card-header/SwapCardHeader.spec.tsx | 2 + .../SwapCardHeader.stories.tsx | 2 + .../swap-card-header/SwapCardHeader.styles.ts | 24 +++ .../swap/swap-card-header/SwapCardHeader.tsx | 23 ++- .../swap/swap-card/SwapCard.spec.tsx | 3 +- .../swap/swap-card/SwapCard.stories.tsx | 2 + .../components/swap/swap-card/SwapCard.tsx | 66 +++---- .../swap-liquidity/SwapLiquidity.stories.tsx | 4 +- .../swap-liquidity/SwapLiquidity.styles.ts | 2 +- packages/web/src/constants/theme.constant.ts | 2 + .../swap-container/SwapContainer.tsx | 16 ++ .../layouts/swap-layout/SwapLayout.styles.ts | 10 +- packages/web/src/styles/ThemeTypes.ts | 1 + 32 files changed, 342 insertions(+), 384 deletions(-) create mode 100644 packages/web/src/components/common/icons/IconPolygon.tsx diff --git a/packages/web/src/components/common/icons/IconPolygon.tsx b/packages/web/src/components/common/icons/IconPolygon.tsx new file mode 100644 index 000000000..12f7249b7 --- /dev/null +++ b/packages/web/src/components/common/icons/IconPolygon.tsx @@ -0,0 +1,17 @@ +const IconPolygon = ({ className }: { className?: string }) => ( + + + +); + +export default IconPolygon; diff --git a/packages/web/src/components/common/icons/IconVector.tsx b/packages/web/src/components/common/icons/IconVector.tsx index d6f1d44fb..685c284b8 100644 --- a/packages/web/src/components/common/icons/IconVector.tsx +++ b/packages/web/src/components/common/icons/IconVector.tsx @@ -10,9 +10,9 @@ const IconVector = ({ className }: { className?: string }) => ( ); diff --git a/packages/web/src/components/swap/swap-button-tooltip/SwapButtonTooltip.spec.tsx b/packages/web/src/components/swap/swap-button-tooltip/SwapButtonTooltip.spec.tsx index 689360aff..4e887acae 100644 --- a/packages/web/src/components/swap/swap-button-tooltip/SwapButtonTooltip.spec.tsx +++ b/packages/web/src/components/swap/swap-button-tooltip/SwapButtonTooltip.spec.tsx @@ -3,13 +3,11 @@ import { Provider as JotaiProvider } from "jotai"; import GnoswapThemeProvider from "@providers/gnoswap-theme-provider/GnoswapThemeProvider"; import SwapButtonTooltip from "./SwapButtonTooltip"; import { dummySwapGasInfo } from "@containers/swap-container/SwapContainer"; -import Button from "@components/common/button/Button"; describe("SwapButtonTooltip Component", () => { it("SwapButtonTooltip render", () => { const mockProps = { swapGasInfo: dummySwapGasInfo, - children: