Skip to content

Commit fd5456e

Browse files
committed
update text components
1 parent 89637fb commit fd5456e

File tree

4 files changed

+27
-35
lines changed

4 files changed

+27
-35
lines changed

src/app/earn/components/earn-widget/components/selector-button.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Flex, Text } from '@chakra-ui/react'
1+
import { Flex } from '@chakra-ui/react'
22
import { ChevronDownIcon } from '@heroicons/react/20/solid'
33
import Image from 'next/image'
44

@@ -31,9 +31,7 @@ export const SelectorButton = ({
3131
visibility={visible ? 'visible' : 'hidden'}
3232
>
3333
<Image alt={`${symbol} logo`} src={image} width={20} height={20} />
34-
<Text color={colors.ic.black} fontSize={'14px'} fontWeight={500} mx='8px'>
35-
{symbol}
36-
</Text>
34+
<p className='text-ic-black mx-2 text-sm font-medium'>{symbol}</p>
3735
{showChevron !== false && (
3836
<ChevronDownIcon className='text-ic-gray-900 size-6' />
3937
)}

src/app/earn/components/earn-widget/components/trade-input-selector.tsx

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Flex, Input, Text } from '@chakra-ui/react'
1+
import { Flex, Input } from '@chakra-ui/react'
22
import { useState } from 'react'
33

44
import { colors } from '@/lib/styles/colors'
@@ -65,20 +65,16 @@ export const TradeInputSelector = (props: TradeInputSelectorProps) => {
6565
<Caption caption={props.caption} />
6666
<Flex align='center' direction='row' justify='space-between' mt='6px'>
6767
{config.isReadOnly ? (
68-
<Text
69-
color={
68+
<p
69+
className={cn(
70+
'text-ellipsis whitespace-nowrap pr-1 text-[25px] font-medium',
7071
props.selectedTokenAmount === '0'
71-
? colors.ic.gray[400]
72-
: colors.ic.black
73-
}
74-
fontSize='25px'
75-
fontWeight={500}
76-
pr='4px'
77-
textOverflow='ellipsis'
78-
whiteSpace='nowrap'
72+
? 'text-ic-gray-400'
73+
: 'text-ic-black',
74+
)}
7975
>
8076
{props.selectedTokenAmount}
81-
</Text>
77+
</p>
8278
) : (
8379
<Input
8480
className='text-ic-black dark:text-ic-white bg-transparent pr-1 text-3xl'
@@ -160,13 +156,11 @@ interface PriceUsdProps {
160156

161157
const PriceUsd = (props: PriceUsdProps) => (
162158
<Flex>
163-
<Text fontSize='12px' fontWeight={500} textColor={colors.ic.gray[400]}>
164-
{props.fiat}
165-
</Text>
159+
<p className='text-ic-gray-400 text-xs font-medium'>{props.fiat}</p>
166160
{props.priceImpact && (
167-
<Text fontSize='12px' textColor={props.priceImpact.colorCoding}>
161+
<p className={cn('text-xs', props.priceImpact.colorCoding)}>
168162
&nbsp;{props.priceImpact.value}
169-
</Text>
163+
</p>
170164
)}
171165
</Flex>
172166
)

src/app/leverage/components/leverage-widget/trade-input-selector.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Flex, Input, Text } from '@chakra-ui/react'
1+
import { Flex, Input } from '@chakra-ui/react'
22

33
import { Caption } from '@/components/swap/components/caption'
44
import { SelectorButton } from '@/components/swap/components/selector-button'
@@ -149,9 +149,9 @@ const PriceUsd = (props: PriceUsdProps) => (
149149
<Flex>
150150
<p className='text-xs font-medium text-neutral-400'>{props.fiat}</p>
151151
{props.priceImpact && (
152-
<Text fontSize='12px' textColor={props.priceImpact.colorCoding}>
152+
<p className={cn('text-xs', props.priceImpact.colorCoding)}>
153153
&nbsp;{props.priceImpact.value}
154-
</Text>
154+
</p>
155155
)}
156156
</Flex>
157157
)

src/components/swap/components/quote-result/available.tsx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import { Flex, Text } from '@chakra-ui/react'
2-
import clsx from 'clsx'
1+
import { Flex } from '@chakra-ui/react'
32
import Image from 'next/image'
43

54
import { StyledSkeleton } from '@/components/skeleton'
@@ -83,22 +82,23 @@ export const QuoteAvailable = (props: QuoteAvailableProps) => {
8382
</Flex>
8483
</Flex>
8584
</Flex>
86-
<Text
87-
className={clsx(isSelected ? 'text-ic-gray-800' : 'text-ic-gray-500')}
88-
fontSize={'2xl'}
89-
fontWeight={500}
85+
<p
86+
className={cn(
87+
'text-2xl font-medium',
88+
isSelected ? 'text-ic-gray-800' : 'text-ic-gray-500',
89+
)}
9090
>
9191
{isLoading && <StyledSkeleton width={200} />}
9292
{!isLoading && quote && quote.outputAmount}
93-
</Text>
93+
</p>
9494
<Flex
9595
direction={['column', 'row']}
9696
justify={['flex-start', 'space-between']}
9797
>
98-
<Text className='text-ic-gray-500' fontSize={'xs'} fontWeight={500}>
98+
<p className='text-ic-gray-500 text-xs font-medium'>
9999
{isLoading && <StyledSkeleton width={80} />}
100100
{!isLoading && quote && quote.feesTotal}
101-
</Text>
101+
</p>
102102
{quote && (
103103
<Flex direction='row' gap='6px'>
104104
<Image
@@ -108,9 +108,9 @@ export const QuoteAvailable = (props: QuoteAvailableProps) => {
108108
height={10}
109109
width={10}
110110
/>
111-
<Text className='text-ic-gray-500' fontSize={'xs'} fontWeight={500}>
111+
<p className='text-ic-gray-500 text-xs font-medium'>
112112
{quote.feesGas}
113-
</Text>
113+
</p>
114114
</Flex>
115115
)}
116116
</Flex>

0 commit comments

Comments
 (0)