Skip to content

Commit 8261c8c

Browse files
committed
feat(v3-uplift): restyle modal close button & align Bridge GHO header button
- BasicModal: close button gets a real hover fill (same alpha/opacity as text-variant buttons) instead of a no-op transparent hover; icon bumped to 30px in a rounded-square hit area, with an adjusted inset - BridgeModalContent: "Transactions" header button now matches the governance header button format (outlined, small, ArrowUpRightIcon) instead of the old heroicons ExternalLinkIcon + custom sizing
1 parent 50c50bc commit 8261c8c

2 files changed

Lines changed: 21 additions & 27 deletions

File tree

src/components/primitives/BasicModal.tsx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Box, IconButton, Modal, Paper } from '@mui/material';
1+
import { alpha, Box, IconButton, Modal, Paper } from '@mui/material';
22
import React from 'react';
33

44
import { CloseIcon } from '../icons/CloseIcon';
@@ -74,19 +74,22 @@ export const BasicModal = ({
7474
{children}
7575

7676
{withCloseButton && (
77-
<Box sx={{ position: 'absolute', top: '24px', right: '50px', zIndex: 5 }}>
77+
<Box sx={{ position: 'absolute', top: '23.5px', right: '54px', zIndex: 5 }}>
7878
<IconButton
7979
sx={{
80-
borderRadius: '50%',
80+
borderRadius: '0.375rem',
8181
p: 0,
8282
minWidth: 0,
8383
position: 'absolute',
84-
'&:hover': { backgroundColor: 'transparent' },
84+
'&:hover': {
85+
backgroundColor: (theme) =>
86+
alpha(theme.palette.text.primary, theme.palette.action.hoverOpacity),
87+
},
8588
}}
8689
onClick={handleClose}
8790
data-cy={'close-button'}
8891
>
89-
<CloseIcon data-cy={'CloseModalIcon'} sx={{ fontSize: '24px', color: 'fg-3' }} />
92+
<CloseIcon data-cy={'CloseModalIcon'} sx={{ fontSize: '30px', color: 'fg-3' }} />
9093
</IconButton>
9194
</Box>
9295
)}

src/components/transactions/Bridge/BridgeModalContent.tsx

Lines changed: 13 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { ChainId } from '@aave/contract-helpers';
2-
import { ExternalLinkIcon, SwitchVerticalIcon } from '@heroicons/react/outline';
2+
import { SwitchVerticalIcon } from '@heroicons/react/outline';
33
import { Trans } from '@lingui/macro';
44
import {
55
Box,
@@ -15,6 +15,7 @@ import { BigNumber } from 'bignumber.js';
1515
import { constants } from 'ethers';
1616
import { formatUnits } from 'ethers/lib/utils';
1717
import React, { useEffect, useState } from 'react';
18+
import { ArrowUpRightIcon } from 'src/components/icons/ArrowUpRightIcon';
1819
import { Link } from 'src/components/primitives/Link';
1920
import { Row } from 'src/components/primitives/Row';
2021
import { Warning } from 'src/components/primitives/Warning';
@@ -341,28 +342,18 @@ export const BridgeModalContent = () => {
341342
<Trans>Bridge GHO</Trans>
342343
</Typography>
343344
{user && (
344-
<Box
345-
sx={{
346-
right: '0px',
347-
}}
345+
<Button
346+
component={Link}
347+
href={`https://ccip.chain.link/address/${user}`}
348+
target="_blank"
349+
rel="noopener"
350+
variant="outlined"
351+
size="small"
352+
endIcon={<ArrowUpRightIcon sx={{ color: 'fgp-3' }} />}
353+
sx={{ minWidth: 'unset', mr: 9 }}
348354
>
349-
<Button
350-
component={Link}
351-
href={`https://ccip.chain.link/address/${user}`}
352-
target="_blank"
353-
rel="noopener"
354-
sx={{ mr: 8 }}
355-
variant="outlined"
356-
size="small"
357-
endIcon={
358-
<SvgIcon sx={{ width: 14, height: 14 }}>
359-
<ExternalLinkIcon />
360-
</SvgIcon>
361-
}
362-
>
363-
<Trans>Transactions</Trans>
364-
</Button>
365-
</Box>
355+
<Trans>Transactions</Trans>
356+
</Button>
366357
)}
367358
</Box>
368359

0 commit comments

Comments
 (0)