1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-23 10:30:04 +01:00
metamask-extension/ui/components/app/nfts-detection-notice/nfts-detection-notice.js
Nidhi Kumari 6535e34943
Replaced all fa-icon-circle with INFO icon (#17539)
* replace all fa-icon-circle with INFO icon

* updated classnames

* updated classnames

* updated snapshots

* updated colors

* resolved errors

* fixed relative import

* fixed lint errors

* added story for alerts tab

* update snapshot

* updated info-circle

* updated enum for iconName

* removed classnames

* updated iconName in settings

* fixed lint errors and snapshots
2023-05-09 23:04:58 +05:30

67 lines
2.0 KiB
JavaScript

import React from 'react';
import { useHistory } from 'react-router-dom';
import Box from '../../ui/box';
import Dialog from '../../ui/dialog';
import Typography from '../../ui/typography/typography';
import {
TypographyVariant,
TEXT_ALIGN,
FONT_WEIGHT,
DISPLAY,
TextColor,
IconColor,
} from '../../../helpers/constants/design-system';
import { useI18nContext } from '../../../hooks/useI18nContext';
import Button from '../../ui/button';
import { EXPERIMENTAL_ROUTE } from '../../../helpers/constants/routes';
import { Icon, IconName } from '../../component-library';
export default function NftsDetectionNotice() {
const t = useI18nContext();
const history = useHistory();
return (
<Box className="nfts-detection-notice">
<Dialog type="message" className="nfts-detection-notice__message">
<Box display={DISPLAY.FLEX}>
<Box paddingTop={1}>
<Icon
name={IconName.Info}
className="info-circle"
color={IconColor.primaryDefault}
/>
</Box>
<Box paddingLeft={2}>
<Typography
color={TextColor.textDefault}
align={TEXT_ALIGN.LEFT}
variant={TypographyVariant.H7}
fontWeight={FONT_WEIGHT.BOLD}
>
{t('newNFTsDetected')}
</Typography>
<Typography
color={TextColor.textDefault}
align={TEXT_ALIGN.LEFT}
variant={TypographyVariant.H7}
boxProps={{ marginBottom: 4 }}
>
{t('newNFTDetectedMessage')}
</Typography>
<Button
type="link"
onClick={(e) => {
e.preventDefault();
history.push(`${EXPERIMENTAL_ROUTE}#autodetect-nfts`);
}}
className="nfts-detection-notice__message__link"
>
{t('selectNFTPrivacyPreference')}
</Button>
</Box>
</Box>
</Dialog>
</Box>
);
}