1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-22 11:22:43 +02:00

Part of 17670: Replace Typography with Text swap-import-token (#18479)

* Initial changes to support Text component in import token component

* linting issue fix

* fix prettier linting issue

* updated styles and attributes for boxProps

* lint leading 0
This commit is contained in:
dswilson4 2023-04-07 08:48:30 -07:00 committed by GitHub
parent b452f40e2f
commit d4e12e55e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 11 deletions

View File

@ -5,10 +5,10 @@ import UrlIcon from '../../../components/ui/url-icon';
import Popover from '../../../components/ui/popover';
import Button from '../../../components/ui/button';
import Box from '../../../components/ui/box';
import Typography from '../../../components/ui/typography';
import { Text } from '../../../components/component-library';
import ActionableMessage from '../../../components/ui/actionable-message/actionable-message';
import {
TypographyVariant,
TextVariant,
FONT_WEIGHT,
AlignItems,
DISPLAY,
@ -62,21 +62,26 @@ export default function ImportToken({
fallbackClassName="import-token__token-icon"
name={tokenForImport.symbol}
/>
<Typography
ariant={TypographyVariant.H4}
<Text
variant={TextVariant.headingSm}
as="h4"
fontWeight={FONT_WEIGHT.BOLD}
boxProps={{ marginTop: 2, marginBottom: 3 }}
marginTop={2}
marginBottom={3}
>
{tokenForImport.name || ''}
</Typography>
<Typography variant={TypographyVariant.H6}>{t('contract')}:</Typography>
<Typography
</Text>
<Text variant={TextVariant.bodySm} as="h6">
{t('contract')}:
</Text>
<Text
variant={TextVariant.bodySm}
className="import-token__contract-address"
variant={TypographyVariant.H7}
boxProps={{ marginBottom: 6 }}
as="h6"
marginBottom={6}
>
{tokenForImport.address || ''}
</Typography>
</Text>
</Box>
</Popover>
);

View File

@ -14,6 +14,7 @@
border-radius: 8px;
background-color: var(--color-background-alternative);
padding: 5px 10px;
font-size: 0.75rem;
}
&__token-icon {