Skip to content

Commit 89a17bc

Browse files
committed
fix: adjust font sizes
1 parent 49a9746 commit 89a17bc

File tree

11 files changed

+62
-57
lines changed

11 files changed

+62
-57
lines changed

packages/extension-polkagate/src/fullscreen/accountDetails/components/AOC.tsx

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,13 @@ const BalanceRow = ({ api, asset, pricesInCurrencies }: BalanceRowProps) => {
5656
token={asset.token}
5757
/>
5858
</Grid>
59-
<Grid item sx={{ fontSize: '13px', fontWeight: 400, lineHeight: 1 }}>
60-
<FormatPrice
61-
amount={total}
62-
decimals={asset.decimal}
63-
fontSize='13px'
64-
price={pricesInCurrencies?.prices?.[asset.priceId]?.value ?? 0}
65-
/>
66-
</Grid>
59+
<FormatPrice
60+
amount={total}
61+
decimals={asset.decimal}
62+
fontSize='13px'
63+
fontWeight={ 400}
64+
price={pricesInCurrencies?.prices?.[asset.priceId]?.value ?? 0}
65+
/>
6766
</Grid>
6867
);
6968
};

packages/extension-polkagate/src/fullscreen/accountDetails/components/AccountInformationForDetails.tsx

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,16 @@ interface PriceJSXType {
2828
}
2929

3030
const Price = ({ balanceToShow, isPriceOutdated, price }: PriceJSXType) => (
31-
<Grid item sx={{ '> div span': { display: 'block' }, color: isPriceOutdated ? 'primary.light' : 'text.primary', fontWeight: 400 }}>
32-
<FormatPrice
33-
amount={getValue('total', balanceToShow)}
34-
decimals={balanceToShow?.decimal}
35-
price={price}
36-
skeletonHeight={22}
37-
width='80px'
38-
/>
39-
</Grid>
31+
<FormatPrice
32+
amount={getValue('total', balanceToShow)}
33+
decimals={balanceToShow?.decimal}
34+
fontSize='28px'
35+
fontWeight= { 400 }
36+
price={price}
37+
skeletonHeight={22}
38+
textColor={ isPriceOutdated ? 'primary.light' : 'text.primary'}
39+
width='80px'
40+
/>
4041
);
4142

4243
interface BalanceJSXType {

packages/extension-polkagate/src/fullscreen/accountDetails/components/AssetSelect.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
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

@@ -19,7 +18,7 @@ interface Props {
1918
setAssetId: React.Dispatch<React.SetStateAction<number | undefined>>
2019
}
2120

22-
function AssetSelect({ address, assetId, label, onChange, setAssetId, style }: Props) {
21+
function AssetSelect ({ address, assetId, label, onChange, setAssetId, style }: Props) {
2322
const tokens = useTokens(address);
2423
const assets = useAssetHubAssets(address);
2524
const options = useMemo(() => (tokens || []).concat(assets || []), [assets, tokens]);

packages/extension-polkagate/src/fullscreen/accountDetails/components/DisplayBalance.tsx

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,12 @@
44
/* eslint-disable react/jsx-max-props-per-line */
55

66
import type { Balance } from '@polkadot/types/interfaces';
7+
import type { BN } from '@polkadot/util';
78

89
import { ArrowForwardIosRounded as ArrowForwardIosRoundedIcon } from '@mui/icons-material';
910
import { Divider, Grid, IconButton, Typography, useTheme } from '@mui/material';
1011
import React from 'react';
1112

12-
import { BN } from '@polkadot/util';
13-
1413
import { FormatPrice, ShowBalance } from '../../../components';
1514

1615
interface Props {
@@ -24,7 +23,7 @@ interface Props {
2423
openCollapse?: boolean;
2524
}
2625

27-
export default function DisplayBalance({ amount, decimal, disabled, onClick, price, openCollapse, title, token }: Props): React.ReactElement {
26+
export default function DisplayBalance ({ amount, decimal, disabled, onClick, openCollapse, price, title, token }: Props): React.ReactElement {
2827
const theme = useTheme();
2928

3029
return (
@@ -43,14 +42,14 @@ export default function DisplayBalance({ amount, decimal, disabled, onClick, pri
4342
/>
4443
</Grid>
4544
<Divider orientation='vertical' sx={{ backgroundColor: 'text.primary', height: '35px', mx: '10px', my: 'auto' }} />
46-
<Grid item sx={{ '> div span': { display: 'block' }, fontSize: '22px', fontWeight: 400 }}>
47-
<FormatPrice
48-
amount={amount}
49-
decimals={decimal}
50-
price={price}
51-
skeletonHeight={20}
52-
/>
53-
</Grid>
45+
<FormatPrice
46+
amount={amount}
47+
decimals={decimal}
48+
fontSize= '22px'
49+
fontWeight= {400}
50+
price={price}
51+
skeletonHeight={20}
52+
/>
5453
{onClick &&
5554
<Grid item m='auto' pl='8px'>
5655
<IconButton

packages/extension-polkagate/src/fullscreen/accountDetails/components/LockedInReferendaFS.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -83,14 +83,14 @@ export default function LockedInReferendaFS ({ address, price, refreshNeeded, se
8383
/>
8484
</Grid>
8585
<Divider orientation='vertical' sx={{ backgroundColor: 'text.primary', height: '35px', mx: '10px', my: 'auto' }} />
86-
<Grid item sx={{ '> div span': { display: 'block' }, fontSize: '22px', fontWeight: 400 }}>
87-
<FormatPrice
88-
amount={totalLocked}
89-
decimals={decimal}
90-
price={price}
91-
skeletonHeight={20}
92-
/>
93-
</Grid>
86+
<FormatPrice
87+
amount={totalLocked}
88+
decimals={decimal}
89+
fontSize= '22px'
90+
fontWeight={ 400}
91+
price={price}
92+
skeletonHeight={20}
93+
/>
9494
</Grid>
9595
<Typography fontSize='12px' fontWeight={500} textAlign='right'>
9696
{api && unlockableAmount && !unlockableAmount.isZero()

packages/extension-polkagate/src/fullscreen/governance/AllReferendaStats.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,11 @@ const TreasuryBalanceStat = ({ address, balance, noDivider, rowDisplay, style, t
6868
<Grid alignItems='center' container item sx={{ fontSize: '18px', fontWeight: 500, height: '36px', letterSpacing: '-0.015em', pt: '10px' }} width='fit-content'>
6969
<ShowBalance api={api} balance={balance} decimal={decimal} decimalPoint={2} token={token} />
7070
</Grid>
71-
<Grid container item sx={{ fontSize: '16px', letterSpacing: '-0.015em' }} width='fit-content'>
71+
<Grid container item width='fit-content'>
7272
<FormatPrice
7373
amount={balance}
7474
decimals={decimal}
75+
fontSize= '16px'
7576
price={tokenPrice}
7677
/>
7778
</Grid>

packages/extension-polkagate/src/fullscreen/governance/post/Description.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,11 +145,12 @@ export default function ReferendumDescription ({ address, currentTreasuryApprova
145145
/>
146146
</Grid>
147147
<Divider flexItem orientation='vertical' sx={{ bgcolor: theme.palette.mode === 'light' ? 'inherit' : 'text.disabled', mx: '7px', my: '8px' }} />
148-
<Grid item sx={{ color: theme.palette.mode === 'light' ? 'text.disabled' : undefined, opacity: theme.palette.mode === 'dark' ? 0.6 : 1 }}>
148+
<Grid item sx={{ opacity: theme.palette.mode === 'dark' ? 0.6 : 1 }}>
149149
<FormatPrice
150150
decimalPoint={2}
151151
num={requestedInUSD || 0}
152152
sign='$'
153+
textColor={ theme.palette.mode === 'light' ? 'text.disabled' : undefined}
153154
/>
154155
</Grid>
155156
</Grid>

packages/extension-polkagate/src/fullscreen/stake/partials/DisplayBalance.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -107,14 +107,14 @@ export default function DisplayBalance ({ actions, address, amount, icons, isUns
107107
/>
108108
</Grid>
109109
<Divider orientation='vertical' sx={{ backgroundColor: 'text.primary', height: '35px', mx: '10px', my: 'auto' }} />
110-
<Grid item sx={{ '> div span': { display: 'block' }, fontSize: '22px', fontWeight: 400 }}>
111-
<FormatPrice
112-
amount={amount}
113-
decimals={decimal}
114-
price={price}
115-
skeletonHeight={20}
116-
/>
117-
</Grid>
110+
<FormatPrice
111+
amount={amount}
112+
decimals={decimal}
113+
fontSize= '22px'
114+
fontWeight= {400}
115+
price={price}
116+
skeletonHeight={20}
117+
/>
118118
</Grid>
119119
<Grid container item justifyContent='flex-end' width='38%'>
120120
{isUnstaking &&

packages/extension-polkagate/src/popup/account/LabelBalancePrice.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,12 @@ export default function LabelBalancePrice ({ address, balances, label, onClick,
5555
withCurrency={false}
5656
/>
5757
</Grid>
58-
<Grid item pt='6px' sx={{ fontSize: label === 'Total' ? '20px' : '16px', fontWeight: label === 'Total' ? 400 : 300, letterSpacing: '-0.015em', lineHeight: '15px' }} textAlign='right'>
58+
<Grid item pt='6px' sx={{ lineHeight: '15px' }} textAlign='right'>
5959
<FormatPrice
6060
amount={value}
6161
decimals={balances?.decimal}
62+
fontSize= {label === 'Total' ? '20px' : '16px'}
63+
fontWeight= {label === 'Total' ? 400 : 300}
6264
price={price}
6365
/>
6466
</Grid>

packages/extension-polkagate/src/popup/account/ReservedReasons.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,12 @@ export default function ReservedReasons ({ address, assetId, identity, setShow,
9595
balance={value}
9696
/>
9797
</Grid>
98-
<Grid item pt='6px' sx={{ fontSize: '16px', fontWeight: 300, letterSpacing: '-0.015em', lineHeight: '15px' }} textAlign='right'>
98+
<Grid item pt='6px' sx={{ letterSpacing: '-0.015em', lineHeight: '15px' }} textAlign='right'>
9999
<FormatPrice
100100
amount={value}
101101
decimals={decimal}
102+
fontSize= '16px'
103+
fontWeight= {300}
102104
price={price}
103105
/>
104106
</Grid>

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

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -102,13 +102,14 @@ export default function AccountDetail ({ address, chain, goToAccount, hideNumber
102102
<>
103103
{priceChainName === undefined || !balanceToShow || balanceToShow?.chainName?.toLowerCase() !== priceChainName
104104
? <Skeleton animation='wave' height={22} sx={{ my: '2.5px', transform: 'none' }} variant='text' width={80} />
105-
: <Grid item sx={{ color: isPriceOutdated ? 'primary.light' : 'text.primary', fontWeight: 300 }}>
106-
<FormatPrice
107-
amount={getValue('total', balanceToShow)}
108-
decimals={balanceToShow.decimal}
109-
price={price}
110-
/>
111-
</Grid>
105+
: <FormatPrice
106+
amount={getValue('total', balanceToShow)}
107+
decimals={balanceToShow.decimal}
108+
fontSize= '18px'
109+
fontWeight= { 300}
110+
price={price}
111+
textColor= {isPriceOutdated ? 'primary.light' : 'text.primary'}
112+
/>
112113
}
113114
</>
114115
);

0 commit comments

Comments
 (0)