File tree Expand file tree Collapse file tree 12 files changed +45
-98
lines changed Expand file tree Collapse file tree 12 files changed +45
-98
lines changed Original file line number Diff line number Diff line change 6
6
PopoverBody ,
7
7
PopoverContent ,
8
8
PopoverTrigger ,
9
- Text ,
10
9
} from '@chakra-ui/react'
11
10
import { Cog8ToothIcon } from '@heroicons/react/20/solid'
12
11
import { useMemo , useRef , useState } from 'react'
@@ -94,9 +93,7 @@ export const Settings = (props: SettingsProps) => {
94
93
w = '320px'
95
94
>
96
95
< PopoverBody >
97
- < Text fontSize = 'md' fontWeight = '500' textColor = { colors . ic . gray [ 600 ] } >
98
- Max Slippage
99
- </ Text >
96
+ < p className = 'text-ic-gray-600 font-medium' > Max Slippage</ p >
100
97
< Flex align = 'center' my = '4' >
101
98
< Toggle
102
99
toggleState = { toggleState }
@@ -132,13 +129,7 @@ export const Settings = (props: SettingsProps) => {
132
129
onChangeInput ( value )
133
130
} }
134
131
/>
135
- < Text
136
- fontSize = { 'sm' }
137
- fontWeight = { 500 }
138
- textColor = { colors . ic . gray [ 900 ] }
139
- >
140
- %
141
- </ Text >
132
+ < p className = 'text-ic-gray-900 text-sm font-medium' > %</ p >
142
133
</ Flex >
143
134
</ Flex >
144
135
{ showWarning && < Warning lowSlippage = { lowSlippage } /> }
Original file line number Diff line number Diff line change 1
- import { Flex , Text } from '@chakra-ui/react'
1
+ import { Flex } from '@chakra-ui/react'
2
2
import { ExclamationCircleIcon } from '@heroicons/react/20/solid'
3
3
4
- import { colors } from '@/lib/styles/colors'
5
-
6
4
type WarningProps = {
7
5
lowSlippage : boolean
8
6
}
@@ -17,22 +15,10 @@ export const Warning = (props: WarningProps) => (
17
15
< Flex direction = { 'column' } >
18
16
< Flex align = { 'center' } direction = { 'row' } >
19
17
< ExclamationCircleIcon className = 'text-ic-yellow size-4' />
20
- < Text
21
- fontSize = { 'md' }
22
- fontWeight = { 500 }
23
- ml = '6px'
24
- textColor = { colors . ic . gray [ 600 ] }
25
- >
26
- Slippage warning
27
- </ Text >
18
+ < p className = 'text-ic-gray-600 ml-1.5 font-medium' > Slippage warning</ p >
28
19
</ Flex >
29
- < Text
30
- fontSize = { 'sm' }
31
- fontWeight = { 400 }
32
- mt = '2px'
33
- textColor = { colors . ic . gray [ 600 ] }
34
- >
20
+ < p className = 'text-ic-gray-600 mt-0.5 text-sm' >
35
21
{ getTexts ( props . lowSlippage ) }
36
- </ Text >
22
+ </ p >
37
23
</ Flex >
38
24
)
Original file line number Diff line number Diff line change @@ -51,10 +51,10 @@ export const QuoteAvailable = (props: QuoteAvailableProps) => {
51
51
>
52
52
< Flex align = 'space-between' direction = 'column' justify = { 'flex-start' } >
53
53
< Flex justify = { 'space-between' } >
54
- < Text className = 'text-ic-gray-500' fontSize = { 'xs' } fontWeight = { 500 } >
54
+ < p className = 'text-ic-gray-500 text-xs font-medium' >
55
55
{ isLoading && < StyledSkeleton width = { 50 } /> }
56
56
{ ! isLoading && quote && quote . inputAmount }
57
- </ Text >
57
+ </ p >
58
58
< Flex direction = { 'row' } gap = { 1 } >
59
59
{ quote ?. isBestQuote && (
60
60
< Flex opacity = { isSelected ? 1 : 0.2 } >
@@ -66,9 +66,9 @@ export const QuoteAvailable = (props: QuoteAvailableProps) => {
66
66
/>
67
67
</ Flex >
68
68
) }
69
- < Text fontSize = { 'sm' } fontWeight = { 600 } textColor = { highlight } >
69
+ < p className = 'text-sm font-semibold' textColor = { highlight } >
70
70
{ type . toUpperCase ( ) }
71
- </ Text >
71
+ </ p >
72
72
</ Flex >
73
73
</ Flex >
74
74
</ Flex >
Original file line number Diff line number Diff line change 1
- import { Flex , Text } from '@chakra-ui/react'
1
+ import { Flex } from '@chakra-ui/react'
2
2
3
3
type QuoteNotAvailableProps = {
4
4
type : string
@@ -18,16 +18,14 @@ export const QuoteNotAvailable = ({ type }: QuoteNotAvailableProps) => {
18
18
h = '110px'
19
19
>
20
20
< Flex justify = 'flex-end' direction = 'row' >
21
- < Text className = 'text-ic-gray-400' fontSize = { 'sm' } fontWeight = { 600 } >
21
+ < p className = 'text-ic-gray-400 text-sm font-semibold' >
22
22
{ type . toUpperCase ( ) }
23
- </ Text >
23
+ </ p >
24
24
</ Flex >
25
- < Text className = 'text-ic-gray-300' fontSize = { 'md' } fontWeight = { 500 } >
26
- { type } unavailable
27
- </ Text >
28
- < Text className = 'text-ic-gray-300' fontSize = { 'sm' } fontWeight = { 400 } >
25
+ < p className = 'text-ic-gray-300 font-medium' > { type } unavailable</ p >
26
+ < p className = 'text-ic-gray-300 text-sm' >
29
27
{ `This token is not available for ${ text } .` }
30
- </ Text >
28
+ </ p >
31
29
</ Flex >
32
30
)
33
31
}
Original file line number Diff line number Diff line change 1
- import { Flex , Text } from '@chakra-ui/react'
1
+ import { Flex } from '@chakra-ui/react'
2
2
import { ChevronDownIcon } from '@heroicons/react/20/solid'
3
3
import Image from 'next/image'
4
4
@@ -31,9 +31,7 @@ export const SelectorButton = ({
31
31
visibility = { visible ? 'visible' : 'hidden' }
32
32
>
33
33
< 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 >
37
35
{ showChevron !== false && (
38
36
< ChevronDownIcon className = 'text-ic-gray-900 size-6' />
39
37
) }
Original file line number Diff line number Diff line change 1
- import { Text } from '@chakra-ui/react'
2
-
3
- import { colors } from '@/lib/styles/colors'
4
-
5
1
interface TagProps {
6
2
label : string
7
3
}
8
4
9
5
export const Tag = ( { label } : TagProps ) => (
10
- < Text fontSize = '12px' fontWeight = { 600 } textColor = { colors . ic . gray [ 600 ] } >
11
- { label }
12
- </ Text >
6
+ < p className = 'text-ic-gray-600 text-xs font-semibold' > { label } </ p >
13
7
)
Original file line number Diff line number Diff line change 1
- import { Flex , Text } from '@chakra-ui/react'
2
-
3
- import { colors } from '@/lib/styles/colors'
1
+ import { Flex } from '@chakra-ui/react'
4
2
5
3
interface TradePriceProps {
6
4
comparisonLabel : string
@@ -10,17 +8,10 @@ interface TradePriceProps {
10
8
export const TradePrice = ( { comparisonLabel, usdLabel } : TradePriceProps ) => {
11
9
return (
12
10
< Flex align = 'flex-start' direction = { [ 'column' , 'row' ] } >
13
- < Text fontSize = '12px' fontWeight = { 500 } textColor = { colors . ic . gray [ 600 ] } >
14
- { comparisonLabel }
15
- </ Text >
16
- < Text
17
- fontSize = '12px'
18
- fontWeight = { 500 }
19
- textColor = { colors . ic . gray [ 400 ] }
20
- ml = { [ 0 , '4px' ] }
21
- >
11
+ < p className = 'text-ic-gray-600 text-xs font-medium' > { comparisonLabel } </ p >
12
+ < p className = 'text-ic-gray-400 ml-0 text-xs font-medium sm:ml-1' >
22
13
{ usdLabel }
23
- </ Text >
14
+ </ p >
24
15
</ Flex >
25
16
)
26
17
}
Original file line number Diff line number Diff line change @@ -151,13 +151,11 @@ interface PriceUsdProps {
151
151
152
152
const PriceUsd = ( props : PriceUsdProps ) => (
153
153
< Flex >
154
- < Text fontSize = '12px' fontWeight = { 500 } textColor = { colors . ic . gray [ 400 ] } >
155
- { props . fiat }
156
- </ Text >
154
+ < p className = 'text-ic-gray-400 text-xs font-medium' > { props . fiat } </ p >
157
155
{ props . priceImpact && (
158
- < Text fontSize = '12px ' textColor = { props . priceImpact . colorCoding } >
156
+ < p className = 'text-xs ' textColor = { props . priceImpact . colorCoding } >
159
157
{ props . priceImpact . value }
160
- </ Text >
158
+ </ p >
161
159
) }
162
160
</ Flex >
163
161
)
Original file line number Diff line number Diff line change 1
- import { Flex , Text } from '@chakra-ui/react'
1
+ import { Flex } from '@chakra-ui/react'
2
2
3
3
import { Token } from '@/constants/tokens'
4
4
import { QuoteType } from '@/lib/hooks/use-best-quote/types'
@@ -40,9 +40,9 @@ export const TradeOutput = (props: TradeOutputProps) => {
40
40
</ Flex >
41
41
< Flex direction = 'column' gap = '8px' mt = '20px' >
42
42
{ props . quotes . length > 0 && (
43
- < Text className = 'text-ic-gray-600' fontSize = 'xs' fontWeight = { 500 } >
43
+ < p className = 'text-ic-gray-600 text-xs font-medium' >
44
44
Select your preferred route
45
- </ Text >
45
+ </ p >
46
46
) }
47
47
{ props . quotes . map ( ( formattedQuote ) => (
48
48
< QuoteResult
Original file line number Diff line number Diff line change 1
- import { Flex , Link , Text } from '@chakra-ui/react'
1
+ import { Flex , Link } from '@chakra-ui/react'
2
2
import { ExclamationCircleIcon } from '@heroicons/react/20/solid'
3
3
import { ReactNode } from 'react'
4
4
5
- import { colors } from '@/lib/styles/colors'
6
5
import { addMEVProtectionChain } from '@/lib/utils/chains'
7
6
8
7
export enum WarningType {
@@ -105,21 +104,11 @@ export const WarningCompProtection = () => {
105
104
< Flex direction = { 'column' } m = '20px 16px 8px' >
106
105
< Flex align = { 'center' } direction = { 'row' } >
107
106
< ExclamationCircleIcon className = 'text-ic-gray-600 dark:text-ic-gray-400 size-5' />
108
- < Text
109
- fontSize = { 'sm' }
110
- fontWeight = { 600 }
111
- ml = { 2 }
112
- textColor = { colors . ic . gray [ 600 ] }
113
- >
107
+ < p className = 'text-ic-gray-600 ml-2 text-sm font-semibold' >
114
108
MEV Protection
115
- </ Text >
109
+ </ p >
116
110
</ Flex >
117
- < Text
118
- fontSize = { 'xs' }
119
- fontWeight = { 400 }
120
- mt = '8px'
121
- textColor = { colors . ic . gray [ 600 ] }
122
- >
111
+ < p className = 'text-ic-gray-600 mt-2 text-xs' >
123
112
It is highly recommended to use an MEV protected RPC.{ ' ' }
124
113
< Link onClick = { onClick } style = { { textDecoration : 'underline' } } >
125
114
Click here
@@ -132,7 +121,7 @@ export const WarningCompProtection = () => {
132
121
>
133
122
Learn More about MEV protection
134
123
</ Link >
135
- </ Text >
124
+ </ p >
136
125
</ Flex >
137
126
)
138
127
}
You can’t perform that action at this time.
0 commit comments