Skip to content

Commit

Permalink
Match target with design
Browse files Browse the repository at this point in the history
  • Loading branch information
kattylucy committed Oct 16, 2024
1 parent cc87f39 commit 41535b3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ function CustomLegend({
<Dot color={item.color} />
{hasType(item) ? (
<Text variant="body3" style={{ lineHeight: 1.8 }}>
<Tooltips type={item.type} label={item.label} color="textSecondary" />
<Tooltips type={item.type} label={item.label} color="textSecondary" size="sm" />
</Text>
) : (
<Text color="textSecondary" variant="body3" style={{ lineHeight: 1.8 }}>
Expand Down
12 changes: 8 additions & 4 deletions centrifuge-app/src/components/PoolCard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { daysBetween } from '../../utils/date'
import { formatBalance, formatBalanceAbbreviated, formatPercentage } from '../../utils/formatting'
import { CardHeader } from '../ListItemCardStyles'
import { RouterTextLink } from '../TextLink'
import { Tooltips } from '../Tooltips'
import { PoolStatus, PoolStatusKey } from './PoolStatus'

export type InnerMetadata = {
Expand Down Expand Up @@ -151,12 +152,15 @@ export function PoolCard({
if (isApr && poolId === NS3_POOL_ID) {
return (
<Box display="flex">
<Text fontWeight={500} as="h2" variant={isOneTranche ? 'heading1' : 'body1'} style={{ width: 35 }}>
<Text
fontWeight={500}
as="h2"
variant={isOneTranche ? 'heading1' : 'body1'}
style={{ width: 35, marginRight: 4 }}
>
{text}
</Text>
<Text variant="label2" style={{ alignSelf: 'flex-end', marginLeft: '4px' }}>
Target
</Text>
<Tooltips type="targetAPY" color="textSecondary" label="Target" size="xs" />
</Box>
)
}
Expand Down
4 changes: 2 additions & 2 deletions centrifuge-app/src/components/Tooltips.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ export type TooltipsProps = {
type?: keyof typeof tooltipText
label?: string | React.ReactNode
props?: any
size?: 'med' | 'sm'
size?: 'med' | 'sm' | 'xs'
color?: string
} & Partial<Pick<TextProps, 'style' | 'body'>>

Expand All @@ -359,7 +359,7 @@ export function Tooltips({ type, label: labelOverride, size = 'sm', props, color
{typeof label === 'string' ? (
<Text
textAlign="left"
variant={size === 'sm' ? 'label2' : 'label1'}
variant={size === 'sm' ? 'label2' : size === 'xs' ? 'body4' : 'label1'}
color={size === 'sm' && !color ? 'textPrimary' : 'textSecondary'}
fontWeight={size === 'sm' ? 'inherit' : 400}
>
Expand Down

0 comments on commit 41535b3

Please sign in to comment.