1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Part of #17670 for: privacy-settings.js (#20288)

* Update privacy-settings.js

* Update ui/pages/onboarding-flow/privacy-settings/privacy-settings.js

Co-authored-by: George Marshall <georgewrmarshall@gmail.com>

* Update ui/pages/onboarding-flow/privacy-settings/privacy-settings.js

Co-authored-by: George Marshall <georgewrmarshall@gmail.com>

* Update ui/pages/onboarding-flow/privacy-settings/privacy-settings.js

Co-authored-by: George Marshall <georgewrmarshall@gmail.com>

* Update ui/pages/onboarding-flow/privacy-settings/privacy-settings.js

Co-authored-by: George Marshall <georgewrmarshall@gmail.com>

* Update ui/pages/onboarding-flow/privacy-settings/privacy-settings.js

Co-authored-by: George Marshall <georgewrmarshall@gmail.com>

* Update privacy-settings.js

* Update index.scss

* Update to html nesting and semantic fix

* lint fix

---------

Co-authored-by: George Marshall <georgewrmarshall@gmail.com>
Co-authored-by: georgewrmarshall <george.marshall@consensys.net>
This commit is contained in:
Harsh Shukla 2023-08-16 02:35:04 +05:30 committed by GitHub
parent 19de95dba3
commit b8475f85d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 25 additions and 27 deletions

View File

@ -64,9 +64,4 @@
padding: 8px !important; padding: 8px !important;
} }
} }
& button {
max-width: 50%;
padding: 15px;
}
} }

View File

@ -12,19 +12,18 @@ import {
PRIVACY_POLICY_LINK, PRIVACY_POLICY_LINK,
} from '../../../../shared/lib/ui-utils'; } from '../../../../shared/lib/ui-utils';
import { import {
BUTTON_SIZES,
BUTTON_VARIANT,
Box,
Button,
PickerNetwork, PickerNetwork,
Text, Text,
TextField, TextField,
} from '../../../components/component-library'; } from '../../../components/component-library';
import Box from '../../../components/ui/box/box';
import Button from '../../../components/ui/button';
import Typography from '../../../components/ui/typography';
import { MetaMetricsContext } from '../../../contexts/metametrics'; import { MetaMetricsContext } from '../../../contexts/metametrics';
import { import {
FONT_WEIGHT,
TextColor, TextColor,
TextVariant, TextVariant,
TypographyVariant,
} from '../../../helpers/constants/design-system'; } from '../../../helpers/constants/design-system';
import { ONBOARDING_PIN_EXTENSION_ROUTE } from '../../../helpers/constants/routes'; import { ONBOARDING_PIN_EXTENSION_ROUTE } from '../../../helpers/constants/routes';
import { useI18nContext } from '../../../hooks/useI18nContext'; import { useI18nContext } from '../../../hooks/useI18nContext';
@ -114,15 +113,12 @@ export default function PrivacySettings() {
<> <>
<div className="privacy-settings" data-testid="privacy-settings"> <div className="privacy-settings" data-testid="privacy-settings">
<div className="privacy-settings__header"> <div className="privacy-settings__header">
<Typography <Text variant={TextVariant.headingLg} as="h2">
variant={TypographyVariant.H2}
fontWeight={FONT_WEIGHT.BOLD}
>
{t('advancedConfiguration')} {t('advancedConfiguration')}
</Typography> </Text>
<Typography variant={TypographyVariant.H4}> <Text variant={TextVariant.headingSm} as="h4">
{t('setAdvancedPrivacySettingsDetails')} {t('setAdvancedPrivacySettingsDetails')}
</Typography> </Text>
</div> </div>
<div <div
className="privacy-settings__settings" className="privacy-settings__settings"
@ -221,9 +217,8 @@ export default function PrivacySettings() {
</div> </div>
) : ( ) : (
<Button <Button
type="secondary" variant={BUTTON_VARIANT.SECONDARY}
rounded size={BUTTON_SIZES.LG}
large
onClick={(e) => { onClick={(e) => {
e.preventDefault(); e.preventDefault();
dispatch(showModal({ name: 'ONBOARDING_ADD_NETWORK' })); dispatch(showModal({ name: 'ONBOARDING_ADD_NETWORK' }));
@ -251,8 +246,8 @@ export default function PrivacySettings() {
}} }}
/> />
{ipfsURL ? ( {ipfsURL ? (
<Typography <Text
variant={TypographyVariant.H7} variant={TextVariant.bodySm}
color={ color={
ipfsError ipfsError
? TextColor.errorDefault ? TextColor.errorDefault
@ -260,7 +255,7 @@ export default function PrivacySettings() {
} }
> >
{ipfsError || t('onboardingAdvancedPrivacyIPFSValid')} {ipfsError || t('onboardingAdvancedPrivacyIPFSValid')}
</Typography> </Text>
) : null} ) : null}
</Box> </Box>
</> </>
@ -329,10 +324,16 @@ export default function PrivacySettings() {
</a>, </a>,
])} ])}
/> />
<Button
variant={BUTTON_VARIANT.PRIMARY}
size={BUTTON_SIZES.LG}
onClick={handleSubmit}
block
marginTop={6}
>
{t('done')}
</Button>
</div> </div>
<Button type="primary" rounded onClick={handleSubmit}>
{t('done')}
</Button>
</div> </div>
</> </>
); );

View File

@ -33,7 +33,9 @@ export const Setting = ({
<Text variant={TextVariant.bodyLgMedium} fontWeight={FontWeight.Bold}> <Text variant={TextVariant.bodyLgMedium} fontWeight={FontWeight.Bold}>
{title} {title}
</Text> </Text>
<Text variant={TextVariant.bodyMd}>{description}</Text> <Text variant={TextVariant.bodyMd} as="div">
{description}
</Text>
</div> </div>
{showToggle ? ( {showToggle ? (
<div className="privacy-settings__setting__toggle"> <div className="privacy-settings__setting__toggle">