diff --git a/apps/main/src/dex/components/pool-alert-messages.tsx b/apps/main/src/dex/components/pool-alert-messages.tsx index 667dfdeb69..89d760bca5 100644 --- a/apps/main/src/dex/components/pool-alert-messages.tsx +++ b/apps/main/src/dex/components/pool-alert-messages.tsx @@ -1,8 +1,4 @@ -import Button from '@mui/material/Button' -import Link from '@mui/material/Link' import Stack from '@mui/material/Stack' -import { ArrowTopRightIcon } from '@ui-kit/shared/icons/ArrowTopRightIcon' -import { RouterLink } from '@ui-kit/shared/ui/RouterLink' import { SizesAndSpaces } from '@ui-kit/themes/design/1_sizes_spaces' const { Spacing } = SizesAndSpaces @@ -20,30 +16,3 @@ export const PoolAlertMessage = ({ children }: { children: React.ReactNode }) => {children} ) - -export const ExternalLink = ({ href, children }: { href: string; children: React.ReactNode }) => ( - -) - -export const InternalLink = ({ href, children }: { href: string; children: React.ReactNode }) => ( - -) diff --git a/apps/main/src/dex/hooks/usePoolAlert.tsx b/apps/main/src/dex/hooks/usePoolAlert.tsx index 8f3953e5f3..28bea8fbda 100644 --- a/apps/main/src/dex/hooks/usePoolAlert.tsx +++ b/apps/main/src/dex/hooks/usePoolAlert.tsx @@ -4,7 +4,8 @@ import { PoolAlert, PoolData, PoolDataCache, type UrlParams } from '@/dex/types/ import { useParams } from '@ui-kit/hooks/router' import { t, Trans } from '@ui-kit/lib/i18n' import { getInternalUrl } from '@ui-kit/shared/routes' -import { ExternalLink, InternalLink, PoolAlertMessage } from '../components/pool-alert-messages' +import { InlineLink } from '@ui-kit/shared/ui/InlineLink' +import { PoolAlertMessage } from '../components/pool-alert-messages' const usePoolAlert = (poolData?: PoolData | PoolDataCache) => { const params = useParams() @@ -69,7 +70,7 @@ const usePoolAlert = (poolData?: PoolData | PoolDataCache) => { subtitle: ( This pool has been deprecated. Please use the{' '} - PRISMA/yPRISMA pool instead. + PRISMA/yPRISMA pool instead. ), }, @@ -91,16 +92,16 @@ const usePoolAlert = (poolData?: PoolData | PoolDataCache) => { Please note that exchanges on synthetix synths are expected to be disabled and users can either withdraw liquidity from the underlying token, or redeem their synths to sUSD on{' '} - synthetix.io + synthetix.io

Users are encouraged to exit the pools in order to avoid getting their holdings‘ value diluted with the discountRate For more information please refer to{' '} - + gov.curve.finance - +

@@ -160,7 +161,7 @@ const usePoolAlert = (poolData?: PoolData | PoolDataCache) => {

- Deposit on yieldbasis.com + Deposit on yieldbasis.com

@@ -193,7 +194,7 @@ const usePoolAlert = (poolData?: PoolData | PoolDataCache) => {

Deposit and Swap with wBTC.e will return an error due to an Aave community decision to freeze this asset.{' '} - More details + More details

diff --git a/packages/curve-ui-kit/src/shared/ui/Banner.tsx b/packages/curve-ui-kit/src/shared/ui/Banner.tsx index d7a6cc3378..aee50e6f71 100644 --- a/packages/curve-ui-kit/src/shared/ui/Banner.tsx +++ b/packages/curve-ui-kit/src/shared/ui/Banner.tsx @@ -19,7 +19,7 @@ const { MaxWidth, Spacing, IconSize } = SizesAndSpaces type BannerSeverity = 'info' | 'highlight' | 'warning' | 'alert' type BannerIcons = BannerSeverity | 'llama' -// TODO: use Secondary color for subtitle instead of Primary +// TODO: temporary fix: used secondary color for subtitle instead of primary const BannerSx: Record; subtitle: SxProps; wrapper: SxProps }> = { info: { title: { color: (t) => t.design.Text.TextColors.FilledFeedback.Info.Primary }, diff --git a/packages/curve-ui-kit/src/shared/ui/InlineLink.tsx b/packages/curve-ui-kit/src/shared/ui/InlineLink.tsx new file mode 100644 index 0000000000..c38b5187cf --- /dev/null +++ b/packages/curve-ui-kit/src/shared/ui/InlineLink.tsx @@ -0,0 +1,21 @@ +import Link from '@mui/material/Link' +import { Link as TanstackLink } from '@tanstack/react-router' +import { ArrowTopRightIcon } from '../icons/ArrowTopRightIcon' + +/** + * InlineLink component is a link that is displayed inline with text. + * Using either Tanstack Link for internal links or MUI Link for external links (with arrow icon). + */ +export const InlineLink = ({ href, children }: { href: string; children: React.ReactNode }) => { + const isExternal = href.startsWith('http') + return ( + + {children} + {isExternal && } + + ) +} diff --git a/packages/curve-ui-kit/src/themes/components/slider/mui-slider.ts b/packages/curve-ui-kit/src/themes/components/slider/mui-slider.ts index a6cd401077..73ab28b875 100644 --- a/packages/curve-ui-kit/src/themes/components/slider/mui-slider.ts +++ b/packages/curve-ui-kit/src/themes/components/slider/mui-slider.ts @@ -17,7 +17,6 @@ import { SLIDER_RAIL_GRADIENT_STOPS_VAR, getGradientStopsForBackground, DEFAULT_SLIDER_SIZE, - thumbColorsMap, } from './utils' /** * Generates styles for a pseudo-element that creates a border around the slider @@ -105,7 +104,7 @@ export const defineMuiSlider = (design: DesignSystem): Components['MuiSlider'] = // Add 2px to the thumb width and height to compensate the border width: size.width, height: size.height, - background: `${thumbColorsMap[design.theme]} url(${sliderThumbImage}) center no-repeat`, + background: `${design.Layer.Highlight.Fill} url(${sliderThumbImage}) center no-repeat`, transition: `background ${TransitionFunction}, border ${TransitionFunction}`, border: `1px solid ${design.Color.Neutral[25]}`, borderRadius: 0, diff --git a/packages/curve-ui-kit/src/themes/components/slider/utils.ts b/packages/curve-ui-kit/src/themes/components/slider/utils.ts index 1ce01ddcc1..daa8696e9b 100644 --- a/packages/curve-ui-kit/src/themes/components/slider/utils.ts +++ b/packages/curve-ui-kit/src/themes/components/slider/utils.ts @@ -1,7 +1,6 @@ import { sortBy } from 'lodash' import { SliderProps } from '@mui/material/Slider' import { DesignSystem } from '@ui-kit/themes/design' -import { Blues, Violets } from '@ui-kit/themes/design/0_primitives' import { SizesAndSpaces } from '@ui-kit/themes/design/1_sizes_spaces' import type { GradientStopsDefinition, @@ -202,10 +201,3 @@ export const createGradientStopsString = (stops: GradientStopsDefinition) => export const orientationToDirection = (orientation: SliderProps['orientation']): 'to right' | 'to top' => getOrientationConfig(orientation).gradientDirection - -// TODO: temporary fix for the "Layers.Highlight.Fill" color difference between codebase and Design -export const thumbColorsMap: Record = { - light: Blues[500], - dark: Blues[50], - chad: Violets[700], -}