Skip to content

Commit 2d98b0f

Browse files
authored
Chore: Add trade related modal color changes matching of earn (#1862)
* added trade related modal color changes matching of earn * adjust rounding to have similar * change radius of network switchprompt as well * fix lint * fix deposits formatting issue * fix formatting issue deposits in mobile too * add zinc-800 for disabled tradebtn * morenav color * no styles
1 parent f0885b1 commit 2d98b0f

File tree

17 files changed

+47
-55
lines changed

17 files changed

+47
-55
lines changed

src/app/earn-old/components/earn-widget/styles.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
.earn-widget {
22
border: 1px solid #ebf2f2;
3-
background: linear-gradient(
3+
background:
4+
linear-gradient(
45
33deg,
56
rgba(0, 189, 192, 0.02) -9.23%,
67
rgba(0, 249, 228, 0.01) 48.82%,

src/app/earn/components/balance-card.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,8 @@ export const BalanceCard = ({ products, balances }: BalanceCardProps) => {
115115
)
116116

117117
return (
118-
<motion.div className='flex w-full flex-wrap gap-6 rounded-3xl border border-gray-600 border-opacity-[0.8] bg-zinc-900 p-6 sm:flex-nowrap'>
119-
<div className='w-full'>
118+
<motion.div className='flex w-full flex-wrap gap-6 rounded-3xl border border-gray-600 border-opacity-[0.8] bg-zinc-900 p-6 md:flex-nowrap'>
119+
<div className='min-w-0 flex-1'>
120120
<h3 className='text-lg font-medium text-neutral-50'>My Earn</h3>
121121
<div className='mt-6'>
122122
<h4 className='ml-4 text-xs font-medium text-neutral-400'>
@@ -137,10 +137,10 @@ export const BalanceCard = ({ products, balances }: BalanceCardProps) => {
137137
</div>
138138
</div>
139139
</div>
140-
<div className='flex w-full min-w-52 flex-col justify-between gap-6 md:w-52'>
140+
<div className='flex w-full min-w-[200px] flex-col justify-between gap-6 md:w-auto'>
141141
<div className='space-y-4 text-right'>
142142
<p className='text-xs font-medium text-neutral-200'>Total Deposits</p>
143-
<p className='text-5xl font-bold text-neutral-50'>
143+
<p className='break-all text-5xl font-bold text-neutral-50'>
144144
${formatAmount(deposits)}
145145
</p>
146146
</div>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export const TradeButton = ({
4444
<Tooltip>
4545
<TooltipTrigger
4646
className={cn(
47-
'w-full rounded-full bg-neutral-100 px-6 py-4 font-bold text-neutral-900 transition duration-300 ease-in-out hover:bg-neutral-300',
47+
'w-full rounded-3xl bg-neutral-100 px-6 py-4 font-semibold text-zinc-800 transition duration-300 ease-in-out hover:bg-neutral-300',
4848
disabled && 'pointer-events-none bg-zinc-800 text-neutral-400',
4949
)}
5050
disabled={disabled}

src/app/earn/components/earn-widget/index.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import { getMaxBalance } from '@/lib/utils/max-balance'
2323

2424
import { useFormattedEarnData } from '../../use-formatted-data'
2525

26-
2726
import { DepositWithdraw } from './components/deposit-withdraw'
2827
import { Projection } from './components/projection'
2928
import { SmartTradeButton } from './components/smart-trade-button'

src/app/legacy/components/redeem-widget/styles.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
.widget {
22
border: 1px solid var(--Coop-Brand-Colors-IC-Gray-1, #ebf2f2);
3-
background: linear-gradient(
3+
background:
4+
linear-gradient(
45
33deg,
56
rgba(0, 189, 192, 0.05) -9.23%,
67
rgba(0, 249, 228, 0.05) 48.82%,
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.leverage-widget {
2+
background:
3+
radial-gradient(
4+
78.46% 76.27% at 41.41% 30.41%,
5+
rgba(243, 255, 239, 0.08) 0%,
6+
rgba(255, 255, 255, 0) 100%
7+
),
8+
linear-gradient(199deg, #1c2929 -20.98%, #143438 222.11%);
9+
}

src/components/header/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export function Header() {
6565
onClose={setMobileMenuOpen}
6666
>
6767
<div className='fixed inset-0 z-10' />
68-
<Dialog.Panel className='bg-ic-white dark:bg-ic-black fixed inset-y-0 right-0 z-10 w-full overflow-y-auto px-6 py-6 sm:max-w-sm sm:ring-1 sm:ring-gray-900/10 dark:sm:ring-gray-100/10'>
68+
<Dialog.Panel className='bg-ic-white fixed inset-y-0 right-0 z-10 w-full overflow-y-auto px-6 py-6 sm:max-w-sm sm:ring-1 sm:ring-gray-900/10 dark:bg-zinc-900 dark:sm:ring-gray-100/10'>
6969
<div className='flex items-center justify-between'>
7070
<Logo />
7171
<button

src/components/header/more-nav.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ type Props = {
1515
export function MoreNav({ navigation }: Props) {
1616
return (
1717
<Popover className='flex'>
18-
<PopoverButton className='data-[active]:text-ic-gray-950 data-[active]:dark:text-ic-white data-[hover]:text-ic-gray-700 data-[hover]:dark:text-ic-gray-100 text-ic-gray-500 dark:text-ic-gray-300 focus:outline-none data-[focus]:outline-1'>
18+
<PopoverButton className='data-[active]:text-ic-gray-950 data-[hover]:text-ic-gray-700 data-[hover]:dark:text-netural-50 text-ic-gray-500 dark:text-ic-gray-300 focus:outline-none data-[focus]:outline-1 data-[active]:dark:text-neutral-400'>
1919
<EllipsisHorizontalIcon aria-hidden='true' className='h-5 w-5' />
2020
</PopoverButton>
2121
<PopoverPanel
2222
transition
2323
anchor='bottom'
24-
className='bg-ic-white dark:bg-ic-black ring-ic-gray-950/10 dark:ring-ic-gray-50/10 z-10 mt-4 rounded-lg shadow-md ring-1 transition duration-200 ease-in-out data-[closed]:-translate-y-1 data-[closed]:opacity-0'
24+
className='bg-ic-white ring-ic-gray-950/10 dark:ring-ic-gray-50/10 z-10 mt-4 rounded-lg shadow-md ring-1 transition duration-200 ease-in-out data-[closed]:-translate-y-1 data-[closed]:opacity-0 dark:bg-zinc-900'
2525
>
2626
<div className='flex flex-col gap-6 p-6'>
2727
{navigation

src/components/header/network-select.tsx

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export const NetworkSelect = () => {
6969
return (
7070
<Popover as='div' className='relative'>
7171
<PopoverButton
72-
className='bg-ic-gray-900 text-ic-white flex items-center gap-2 rounded-md border-none px-4 py-1 text-sm transition-all duration-300 hover:scale-[1.04]'
72+
className='text-ic-white flex items-center gap-2 rounded-md border-none bg-zinc-900 px-4 py-1 text-sm transition-all duration-300 hover:scale-[1.04]'
7373
onClick={() => open({ view: 'Networks' })}
7474
>
7575
{imageSrc && (
@@ -93,7 +93,7 @@ export const NetworkSelect = () => {
9393
anchor='bottom'
9494
initial={{ opacity: 0, scale: 0.95 }}
9595
animate={{ opacity: 1, scale: 1, transition: { delay: 1 } }}
96-
className='dark:bg-ic-black dark:border-ic-gray-800 dark:text-ic-white text-ic-black z-50 mt-8 w-80 !overflow-visible rounded-md border border-gray-300 bg-white p-4 shadow-md'
96+
className='text-ic-black z-50 mt-8 w-80 !overflow-visible rounded-md border border-gray-300 bg-white p-4 shadow-md dark:border-neutral-600 dark:bg-zinc-900 dark:text-neutral-50'
9797
exit={{ opacity: 0, scale: 0.95 }}
9898
>
9999
{!pathname.startsWith(Path.EARN) && (
@@ -116,22 +116,20 @@ export const NetworkSelect = () => {
116116
<XMarkIcon className='dark:fill-ic-white group-hover:fill-ic-white' />
117117
</Button>
118118
)}
119-
<div className='border-b-ic-gray-300 dark:border-b-ic-gray-800 absolute -top-[18px] left-1/2 h-0 w-0 -translate-x-1/2 border-b-[18px] border-l-[13px] border-r-[13px] border-l-transparent border-r-transparent'></div>
120-
<div className='border-b-ic-white dark:border-b-ic-black absolute -top-4 left-1/2 h-0 w-0 -translate-x-1/2 border-b-[16px] border-l-[12px] border-r-[12px] border-l-transparent border-r-transparent'></div>
119+
<div className='border-b-ic-gray-300 absolute -top-[18px] left-1/2 h-0 w-0 -translate-x-1/2 border-b-[18px] border-l-[13px] border-r-[13px] border-l-transparent border-r-transparent dark:border-b-neutral-600'></div>
120+
<div className='border-b-ic-white absolute -top-4 left-1/2 h-0 w-0 -translate-x-1/2 border-b-[16px] border-l-[12px] border-r-[12px] border-l-transparent border-r-transparent dark:border-b-zinc-900'></div>
121121

122-
<p className='text-md mb-6 mt-2 font-bold'>
122+
<p className='text-md mb-6 mt-2 text-neutral-400'>
123123
You have followed a link that requires your wallet to switch to{' '}
124-
<b className='text-ic-blue-500'>{getNetworkName(chainId)}</b>.
124+
<b className='text-neutral-50'>{getNetworkName(chainId)}</b>.
125125
</p>
126-
<p className='text-sm'>
126+
<p className='text-sm text-neutral-400'>
127127
Your wallet is currently connected to{' '}
128-
<b className='text-ic-blue-500'>
129-
{getNetworkName(walletChainId)}
130-
</b>
128+
<b className='text-neutral-50'>{getNetworkName(walletChainId)}</b>
131129
.
132130
</p>
133131
<Button
134-
className='bg-ic-blue-500 hover:bg-ic-blue-500/90 active:bg-ic-blue-500/80 mt-4 w-full rounded-md p-2 font-bold text-white'
132+
className='mt-4 w-full rounded-3xl bg-neutral-50 p-2 font-bold text-neutral-900 hover:bg-neutral-100 active:bg-neutral-200'
135133
onClick={() => chainId && switchChain({ chainId })}
136134
>
137135
Switch to {getNetworkName(chainId)}

src/components/swap/components/transaction-review/components/bottom-message.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export function BottomMessage() {
22
return (
3-
<div className='text-ic-gray-600 dark:text-ic-gray-300 mb-4 mt-2 text-center text-sm font-medium'>
3+
<div className='text-ic-gray-600 mb-4 mt-2 text-center text-sm font-medium dark:text-neutral-400'>
44
Submitting will open your currently connected wallet to confirm and sign
55
the transaction.
66
</div>

0 commit comments

Comments
 (0)