Skip to content

Commit

Permalink
Part of 17670: Replace Typography with Text in detected-token-address…
Browse files Browse the repository at this point in the history
….js (#18435)

* feat: replaced typography with text comp

* fix: changed h7 to h6

---------

Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
  • Loading branch information
Ananyamadhu08 and legobeat authored Apr 24, 2023
1 parent db4c431 commit b53d335
Showing 1 changed file with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,34 +6,35 @@ import { useCopyToClipboard } from '../../../../hooks/useCopyToClipboard';

import Box from '../../../ui/box';
import Button from '../../../ui/button';
import Typography from '../../../ui/typography';
import Tooltip from '../../../ui/tooltip';

import {
DISPLAY,
TextColor,
TypographyVariant,
TextVariant,
} from '../../../../helpers/constants/design-system';

import { shortenAddress } from '../../../../helpers/utils/util';
import { Text } from '../../../component-library';

const DetectedTokenAddress = ({ tokenAddress }) => {
const t = useI18nContext();
const [copied, handleCopy] = useCopyToClipboard();

return (
<Box display={DISPLAY.INLINE_FLEX} className="detected-token-address">
<Typography variant={TypographyVariant.H7} color={TextColor.textDefault}>
<Text variant={TextVariant.bodySm} as="h6" color={TextColor.textDefault}>
{`${t('tokenAddress')}:`}
</Typography>
<Typography
variant={TypographyVariant.H7}
</Text>
<Text
variant={TextVariant.bodySm}
as="h6"
color={TextColor.primaryDefault}
marginLeft={2}
marginRight={2}
>
{shortenAddress(tokenAddress)}
</Typography>
</Text>
<Tooltip
position="bottom"
title={copied ? t('copiedExclamation') : t('copyToClipboard')}
Expand Down

0 comments on commit b53d335

Please sign in to comment.