Skip to content

Commit 9a914cc

Browse files
committed
style: reduce icons size in home extension mode
1 parent 8354906 commit 9a914cc

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ interface Props {
2424
withHoverEffect?: boolean;
2525
}
2626

27-
export default function MenuItem({ children, disabled = false, fontSize, icon, iconComponent, onClick, pl = '0', py = '8px', showChevron, showSubMenu = false, text, withHoverEffect }: Props): React.ReactElement<Props> {
27+
export default function MenuItem ({ children, disabled = false, fontSize, icon, iconComponent, onClick, pl = '0', py = '8px', showChevron, showSubMenu = false, text, withHoverEffect }: Props): React.ReactElement<Props> {
2828
const hoverEffectStyles: SxProps<Theme> = {
2929
'&:hover': { bgcolor: disabled ? 'none' : 'divider' },
3030
borderRadius: '5px',

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: 3 additions & 3 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
);
@@ -162,7 +162,7 @@ function AccountDetail ({ address, chain, goToAccount, hideNumbers, identity, is
162162
<Grid container direction='column' sx={{ width: '70%' }}>
163163
<Grid container direction='row' item sx={{ lineHeight: '20px' }}>
164164
<Grid item maxWidth='70%' onClick={goToAccount} sx={{ cursor: 'pointer' }}>
165-
<Typography fontSize='28px' overflow='hidden' textOverflow='ellipsis' whiteSpace='nowrap'>
165+
<Typography fontSize='24px' overflow='hidden' textOverflow='ellipsis' whiteSpace='nowrap'>
166166
{identity?.display || name || t('Unknown')}
167167
</Typography>
168168
</Grid>
@@ -173,7 +173,7 @@ function AccountDetail ({ address, chain, goToAccount, hideNumbers, identity, is
173173
/>
174174
</Grid>
175175
<Grid item sx={{ m: '10px 0', width: 'fit-content' }}>
176-
<OptionalCopyButton address={address} />
176+
<OptionalCopyButton address={address} iconWidth={15} />
177177
</Grid>
178178
</Grid>
179179
<Grid alignItems='center' container item>

0 commit comments

Comments
 (0)