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

replaced actionablemessage in Import-Token.js #20147

Merged
merged 9 commits into from
Jul 25, 2023
5 changes: 2 additions & 3 deletions ui/pages/swaps/import-token/import-token.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ 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';
Copy link
Contributor

Choose a reason for hiding this comment

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

Optional: If you'd like to take this PR a step further you could use the Box and Button components from the component-library as well. You will have to update some of the component props as the component API is different for the Button component so it does add a level of complexity to completing this task. Completely optional!

Copy link
Contributor

Choose a reason for hiding this comment

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

You could also replace UrlIcon with AvatarToken from the component-library

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah sure, why not.This was only a single line change PR anyway. Should I try and remove all the deprecated Components in this file ?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think that would still make this PR a reasonable size to review. You could also do it in parts if you'd like to get this PR in first. Then create another PR to update the rest.

Copy link
Contributor

Choose a reason for hiding this comment

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

I should point out that the more components that are replaced the more likely hood you will need to update e2e tests which adds a fair amount of complexity to the task.

import { Text } from '../../../components/component-library';
import ActionableMessage from '../../../components/ui/actionable-message/actionable-message';
import { Text, BannerAlert } from '../../../components/component-library';
import {
TextVariant,
FONT_WEIGHT,
Expand Down Expand Up @@ -55,7 +54,7 @@ export default function ImportToken({
display={DISPLAY.FLEX}
className="import-token"
>
<ActionableMessage type="danger" message={t('importTokenWarning')} />
<BannerAlert severity="danger" description={t('importTokenWarning')} />
georgewrmarshall marked this conversation as resolved.
Show resolved Hide resolved
<UrlIcon
url={tokenForImport.iconUrl}
className="import-token__token-icon"
Expand Down
Loading