Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Part of #18714 and #17670:set-approval-for-all-warnings #19115

Merged
merged 4 commits into from
May 15, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ import { useI18nContext } from '../../../hooks/useI18nContext';
import Popover from '../../ui/popover';
import Box from '../../ui/box';
import Button from '../../ui/button';
import Typography from '../../ui/typography';

import {
DISPLAY,
FLEX_DIRECTION,
FONT_WEIGHT,
FontWeight,
JustifyContent,
TextColor,
TypographyVariant,
TextVariant,
} from '../../../helpers/constants/design-system';
import Identicon from '../../ui/identicon';
import { shortenAddress } from '../../../helpers/utils/util';
import { Icon, IconName } from '../../component-library';
import { Icon, IconName, Text } from '../../component-library';

const SetApproveForAllWarning = ({
collectionName,
Expand Down Expand Up @@ -65,12 +65,13 @@ const SetApproveForAllWarning = ({
name={IconName.Danger}
className="set-approval-for-all-warning__content__header__warning-icon"
/>
<Typography
variant={TypographyVariant.H4}
fontWeight={FONT_WEIGHT.BOLD}
<Text
variant={TextVariant.headingSm}
as="h4"
fontWeight={FontWeight.Bold}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't need the bold weight as headingSm is already bold?

Suggested change
fontWeight={FontWeight.Bold}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made the suggested changes but the same tests are failing again :/
Sorry for the inconvenience.

>
{t('yourNFTmayBeAtRisk')}
</Typography>
</Text>
</Box>
<Box
display={DISPLAY.FLEX}
Expand All @@ -80,25 +81,25 @@ const SetApproveForAllWarning = ({
>
<Box display={DISPLAY.FLEX}>
<Identicon address={senderAddress} diameter={32} />
<Typography
variant={TypographyVariant.H5}
<Text
variant={TextVariant.bodyMd}
as="h5"
marginLeft={2}
className="set-approval-for-all-warning__content__account-name"
>
<b>{name}</b> {` (${shortenAddress(senderAddress)})`}
</Typography>
</Text>
</Box>
{isERC721 && total && (
<Typography>{`${t('total')}: ${total}`}</Typography>
)}
{isERC721 && total && <Text>{`${t('total')}: ${total}`}</Text>}
</Box>

<Typography
<Text
color={TextColor.textAlternative}
margin={4}
marginTop={4}
marginBottom={4}
variant={TypographyVariant.H6}
variant={TextVariant.bodySm}
as="h6"
>
{t('nftWarningContent', [
<strong
Expand All @@ -111,7 +112,7 @@ const SetApproveForAllWarning = ({
{t('nftWarningContentGrey')}
</strong>,
])}
</Typography>
</Text>
</Popover>
);
};
Expand Down