Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 9 additions & 17 deletions apps/main/src/dex/components/pool-alert-messages.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
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'
Expand All @@ -22,28 +21,21 @@ export const PoolAlertMessage = ({ children }: { children: React.ReactNode }) =>
)

export const ExternalLink = ({ href, children }: { href: string; children: React.ReactNode }) => (
<Button
color="ghost"
size="extraSmall"
component={Link}
sx={{ color: 'currentColor', textUnderlineOffset: '2px', '&:hover': { textDecoration: 'underline' } }}
endIcon={<ArrowTopRightIcon fontSize={'small'} />}
<Link
sx={{
color: 'currentColor',
'&:hover': { textDecoration: 'none' },
}}
href={href}
target="_blank"
rel="noreferrer noopener"
>
{children}
</Button>
{children} <ArrowTopRightIcon fontSize={'small'} />
</Link>
)

export const InternalLink = ({ href, children }: { href: string; children: React.ReactNode }) => (
<Button
color="ghost"
size="extraSmall"
component={RouterLink}
href={href}
sx={{ color: 'currentColor', textUnderlineOffset: '2px', '&:hover': { textDecoration: 'underline' } }}
>
<RouterLink href={href} sx={{ color: 'currentColor', '&:hover': { textDecoration: 'none' } }}>
{children}
</Button>
</RouterLink>
)
2 changes: 1 addition & 1 deletion packages/curve-ui-kit/src/shared/ui/Banner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<BannerSeverity, { title: SxProps<Theme>; subtitle: SxProps<Theme>; wrapper: SxProps<Theme> }> = {
info: {
title: { color: (t) => t.design.Text.TextColors.FilledFeedback.Info.Primary },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down
8 changes: 0 additions & 8 deletions packages/curve-ui-kit/src/themes/components/slider/utils.ts
Original file line number Diff line number Diff line change
@@ -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,
Expand Down Expand Up @@ -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<DesignSystem['theme'], string> = {
light: Blues[500],
dark: Blues[50],
chad: Violets[700],
}
Loading