Skip to content

Commit 2206c12

Browse files
authored
style: reduce icons size in home extension mode (#1628)
1 parent ff33a06 commit 2206c12

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

packages/extension-polkagate/src/components/OptionalCopyButton.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
// Copyright 2019-2024 @polkadot/extension-polkagate authors & contributors
22
// SPDX-License-Identifier: Apache-2.0
3-
// @ts-nocheck
43

54
/* eslint-disable react/jsx-max-props-per-line */
65

76
import { Grid, Popover, useTheme } from '@mui/material';
87
import React, { useCallback, useMemo, useState } from 'react';
98

10-
import OptionalCopyPopup from '../partials/OptionalCopyPopup';
119
import { VaadinIcon } from '../components';
10+
import OptionalCopyPopup from '../partials/OptionalCopyPopup';
1211

1312
interface Props {
1413
address: string | undefined;
14+
iconWidth?: number;
1515
}
1616

17-
function OptionalCopyButton({ address }: Props): React.ReactElement {
17+
function OptionalCopyButton ({ address, iconWidth = 20 }: Props): React.ReactElement {
1818
const theme = useTheme();
1919

2020
const [anchorEl, setAnchorEl] = useState<HTMLButtonElement | null>(null);
@@ -35,7 +35,7 @@ function OptionalCopyButton({ address }: Props): React.ReactElement {
3535
return (
3636
<>
3737
<Grid alignItems='center' aria-describedby={id} component='button' container direction='column' item justifyContent='center' onClick={onCopyIconClick} sx={{ bgcolor: 'transparent', border: 'none', cursor: 'pointer', p: '2px 6px', position: 'relative', width: '35px' }}>
38-
<VaadinIcon icon='vaadin:copy-o' style={{ color: `${theme.palette.secondary.light}`, width: '20px' }} />
38+
<VaadinIcon icon='vaadin:copy-o' style={{ color: `${theme.palette.secondary.light}`, width: `${iconWidth}px` }} />
3939
</Grid>
4040
<Popover
4141
PaperProps={{

packages/extension-polkagate/src/popup/home/AccountDetail.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const EyeButton = ({ isHidden, toggleVisibility }: EyeProps) => {
4343
return (
4444
<Infotip text={isHidden ? t('This account is hidden from websites') : t('This account is visible to websites')}>
4545
<IconButton onClick={toggleVisibility} sx={{ height: '15px', ml: '7px', mt: '13px', p: 0, width: '24px' }}>
46-
<VaadinIcon icon={isHidden ? 'vaadin:eye-slash' : 'vaadin:eye'} style={{ color: `${theme.palette.secondary.light}`, height: '20px' }} />
46+
<VaadinIcon icon={isHidden ? 'vaadin:eye-slash' : 'vaadin:eye'} style={{ color: `${theme.palette.secondary.light}`, height: '17px' }} />
4747
</IconButton>
4848
</Infotip>
4949
);
@@ -174,7 +174,7 @@ function AccountDetail ({ address, chain, goToAccount, hideNumbers, identity, is
174174
/>
175175
</Grid>
176176
<Grid item sx={{ m: '10px 0', width: 'fit-content' }}>
177-
<OptionalCopyButton address={address} />
177+
<OptionalCopyButton address={address} iconWidth={15} />
178178
</Grid>
179179
</Grid>
180180
<Grid alignItems='center' container item>

0 commit comments

Comments
 (0)