From 19c695e410e79dc6bded531451158727b24a3d7d Mon Sep 17 00:00:00 2001 From: Randolph <840094513@qq.com> Date: Tue, 12 Jul 2022 16:58:19 +0800 Subject: [PATCH 1/2] feat: change dialog width --- .../TokenSecurity/CheckSecurityDialog.tsx | 20 +++++++++---------- .../components/SecurityPanel.tsx | 8 +------- 2 files changed, 10 insertions(+), 18 deletions(-) diff --git a/packages/shared/src/UI/components/TokenSecurity/CheckSecurityDialog.tsx b/packages/shared/src/UI/components/TokenSecurity/CheckSecurityDialog.tsx index 868420c0fc9d..05b73a696920 100644 --- a/packages/shared/src/UI/components/TokenSecurity/CheckSecurityDialog.tsx +++ b/packages/shared/src/UI/components/TokenSecurity/CheckSecurityDialog.tsx @@ -12,13 +12,15 @@ import { useFungibleToken, useFungibleTokenPrice } from '@masknet/plugin-infra/w import { NetworkPluginID } from '@masknet/web3-shared-base' const useStyles = makeStyles()((theme) => ({ - root: { + title: { width: 600, }, content: { - height: 510, - maxHeight: 510, - padding: 16, + margin: 0, + padding: '0px !important', + '::-webkit-scrollbar': { + display: 'none', + }, }, footer: { boxShadow: @@ -30,7 +32,7 @@ const useStyles = makeStyles()((theme) => ({ }, })) -export interface BuyTokenDialogProps extends withClasses { +export interface BuyTokenDialogProps { open: boolean onClose(): void tokenSecurity: TokenSecurity @@ -53,13 +55,9 @@ export function CheckSecurityDialog(props: BuyTokenDialogProps) { }, [tokenSecurity]) return ( - + - + {loadingToken && (
diff --git a/packages/shared/src/UI/components/TokenSecurity/components/SecurityPanel.tsx b/packages/shared/src/UI/components/TokenSecurity/components/SecurityPanel.tsx index 7935137dde87..b2f55f3a569b 100644 --- a/packages/shared/src/UI/components/TokenSecurity/components/SecurityPanel.tsx +++ b/packages/shared/src/UI/components/TokenSecurity/components/SecurityPanel.tsx @@ -27,17 +27,11 @@ const useStyles = makeStyles()((theme) => ({ fontWeight: 700, fontSize: 18, }, - root: { - width: '600px', - }, detectionCard: { backgroundColor: theme.palette.background.default, }, detectionCollection: { overflowY: 'auto', - '&::-webkit-scrollbar': { - display: 'none', - }, }, icon: { width: '48px', @@ -101,7 +95,7 @@ export const SecurityPanel = memo(({ tokenSecurity, tokenInfo, t }, [riskyFactors, attentionFactors]) return ( - + Date: Tue, 12 Jul 2022 17:01:07 +0800 Subject: [PATCH 2/2] feat: delete useless code --- .../src/UI/components/TokenSecurity/CheckSecurityDialog.tsx | 3 --- 1 file changed, 3 deletions(-) diff --git a/packages/shared/src/UI/components/TokenSecurity/CheckSecurityDialog.tsx b/packages/shared/src/UI/components/TokenSecurity/CheckSecurityDialog.tsx index 05b73a696920..a47eb982e03d 100644 --- a/packages/shared/src/UI/components/TokenSecurity/CheckSecurityDialog.tsx +++ b/packages/shared/src/UI/components/TokenSecurity/CheckSecurityDialog.tsx @@ -12,9 +12,6 @@ import { useFungibleToken, useFungibleTokenPrice } from '@masknet/plugin-infra/w import { NetworkPluginID } from '@masknet/web3-shared-base' const useStyles = makeStyles()((theme) => ({ - title: { - width: 600, - }, content: { margin: 0, padding: '0px !important',