Skip to content

Commit

Permalink
style: adjust paddings
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick-1979 committed Nov 16, 2024
1 parent 36f3f4b commit 80d3a9f
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
3 changes: 1 addition & 2 deletions packages/extension-polkagate/src/components/SlidePopUp.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Copyright 2019-2024 @polkadot/extension-polkagate authors & contributors
// SPDX-License-Identifier: Apache-2.0
// @ts-nocheck

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

Expand All @@ -12,7 +11,7 @@ interface Props {
show: boolean;
}

export default function SlidePopUp({ children, show }: Props): React.ReactElement<Props> {
export default function SlidePopUp ({ children, show }: Props): React.ReactElement<Props> {
const theme = useTheme();
const ref = React.useRef(null);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ interface Props {
open: boolean;
onClose: () => void
blurBackdrop?: boolean;
pt?: number
px?: number
}

export function DraggableModal ({ blurBackdrop, children, maxHeight = 740, minHeight = 615, onClose, open, px = 4, width = 500 }: Props): React.ReactElement<Props> {
export function DraggableModal ({ blurBackdrop, children, maxHeight = 740, minHeight = 615, onClose, open, pt = 2, px = 4, width = 500 }: Props): React.ReactElement<Props> {
const theme = useTheme();

const isDarkMode = useMemo(() => theme.palette.mode === 'dark', [theme.palette.mode]);
Expand Down Expand Up @@ -74,7 +75,7 @@ export function DraggableModal ({ blurBackdrop, children, maxHeight = 740, minHe
minHeight: `${minHeight}px`,
pb: 3,
position: 'absolute',
pt: 2,
pt,
px,
top: modalPosition.y,
width: `${width}px`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ export default function PoolMoreInfo ({ api, chain, pool, poolId, setShowPoolInf
const page = (
<Grid alignItems='flex-start' bgcolor='background.default' container display='block' item mt={isExtensionPopup ? '46px' : 0} sx={{ borderRadius: '10px 10px 0px 0px', height: 'parent.innerHeight' }} width='100%'>
<Grid container justifyContent='center' my='20px'>
<Typography fontSize='28px' fontWeight={400} lineHeight={1.4}>
<Typography fontSize='20px' fontWeight={400} lineHeight={1.4}>
{t('Pool Info')}
</Typography>
</Grid>
Expand Down Expand Up @@ -334,7 +334,7 @@ export default function PoolMoreInfo ({ api, chain, pool, poolId, setShowPoolInf
? <SlidePopUp show={showPoolInfo}>
{page}
</SlidePopUp>
: <DraggableModal minHeight={650} onClose={_closeMenu} open={showPoolInfo}>
: <DraggableModal blurBackdrop minHeight={650} onClose={_closeMenu} open={showPoolInfo} pt={0} px={0}>
{page}
</DraggableModal>
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ export default function ValidatorInfoPage ({ api, chain, isFullscreen, setShowVa
const page = (
<Grid alignItems='flex-start' bgcolor='background.default' container display='block' item mt={isFullscreen ? 0 : '46px'} sx={{ borderRadius: '10px 10px 0px 0px', height: 'parent.innerHeight' }} width='100%'>
<Grid container justifyContent='center' mb='20px'>
<Typography fontSize='28px' fontWeight={400} lineHeight={1.4} sx={{ borderBottom: '2px solid', borderColor: 'secondary.light' }}>
<Typography fontSize='20px' fontWeight={400} lineHeight={1.4} sx={{ borderBottom: '2px solid', borderColor: 'secondary.light' }}>
{t('Validator’s Info')}
</Typography>
</Grid>
Expand All @@ -242,7 +242,7 @@ export default function ValidatorInfoPage ({ api, chain, isFullscreen, setShowVa

if (isFullscreen) {
return (
<DraggableModal onClose={onClose} open={showValidatorInfo} px={0}>
<DraggableModal blurBackdrop onClose={onClose} open={showValidatorInfo} px={0}>
{page}
</DraggableModal>
);
Expand Down
2 changes: 1 addition & 1 deletion packages/extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"sideEffects": false,
"type": "module",
"version": "0.29.1",
"version": "0.30.0",
"dependencies": {
"@polkadot/api": "^11.2.1",
"@polkadot/extension-base": "^0.47.5",
Expand Down
2 changes: 1 addition & 1 deletion packages/extension/src/packageInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@

// Do not edit, auto-generated by @polkadot/dev

export const packageInfo = { name: '@polkadot/extension', path: 'auto', type: 'auto', version: '0.29.1' };
export const packageInfo = { name: '@polkadot/extension', path: 'auto', type: 'auto', version: '0.30.0' };

0 comments on commit 80d3a9f

Please sign in to comment.