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

fix icon names #17391

Merged
merged 2 commits into from
Jan 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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 @@ -274,9 +274,7 @@ export default function CollectibleDetails({ collectible }) {
handleSourceCopy(collectibleImageURL);
}}
iconName={
sourceCopied
? ICON_NAMES.COPY_SUCCESS_FILLED
: ICON_NAMES.COPY_FILLED
sourceCopied ? ICON_NAMES.COPY_SUCCESS : ICON_NAMES.COPY
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Before
Screenshot 2023-01-24 at 2 44 49 PM

After
Screenshot 2023-01-24 at 2 44 59 PM

}
/>
</Box>
Expand Down Expand Up @@ -331,9 +329,7 @@ export default function CollectibleDetails({ collectible }) {
handleAddressCopy(address);
}}
iconName={
addressCopied
? ICON_NAMES.COPY_SUCCESS_FILLED
: ICON_NAMES.COPY_FILLED
addressCopied ? ICON_NAMES.COPY_SUCCESS : ICON_NAMES.COPY
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Screenshot 2023-01-24 at 2 46 11 PM

}
/>
</Box>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const SnapDelineator = ({ snapName, children }) => {
paddingTop={1}
paddingBottom={1}
>
<Icon name="snaps-filled" color={COLORS.INFO_DEFAULT} size={SIZES.SM} />
<Icon name="snaps" color={COLORS.INFO_DEFAULT} size={SIZES.SM} />
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Before
Screenshot 2023-01-24 at 2 49 08 PM

After
Screenshot 2023-01-24 at 2 49 12 PM

<Text
variant={TEXT.BODY_SM}
color={COLORS.INFO_DEFAULT}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export default function SignatureRequestSIWE({
iconFillColor="var(--color-warning-default)"
useIcon
withRightButton
icon={<Icon name="danger-filled" color={COLORS.WARNING_DEFAULT} />}
icon={<Icon name="danger" color={COLORS.WARNING_DEFAULT} />}
/>
)}
{!isSIWEDomainValid && (
Expand All @@ -121,7 +121,7 @@ export default function SignatureRequestSIWE({
iconFillColor="var(--color-error-default)"
useIcon
withRightButton
icon={<Icon name="danger-filled" color={COLORS.ERROR_DEFAULT} />}
icon={<Icon name="danger" color={COLORS.ERROR_DEFAULT} />}
/>
)}
<PageContainerFooter
Expand Down
2 changes: 1 addition & 1 deletion ui/components/component-library/banner-base/README.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ import { BannerBase, Icon, ICON_NAMES } from '../../component-library';

<BannerBase
title="Start accessory demo"
startAccessory={<Icon name={ICON_NAMES.INFO_FILLED} size={SIZES.LG} />}
startAccessory={<Icon name={ICON_NAMES.INFO} size={SIZES.LG} />}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Before
Screenshot 2023-01-24 at 2 53 27 PM

After
Screenshot 2023-01-24 at 2 53 35 PM

>
The info icon on the left is passed through the startAccessory prop
</BannerBase>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export const BannerBase = ({
{onClose && (
<ButtonIcon
className="mm-banner-base__close-button"
iconName={ICON_NAMES.CLOSE_OUTLINE}
iconName={ICON_NAMES.CLOSE}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Before
Screenshot 2023-01-24 at 2 54 15 PM

After
Screenshot 2023-01-24 at 2 54 22 PM

size={SIZES.SM}
ariaLabel="Close" // TODO: i18n
onClick={onClose}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ DefaultStory.args = {
title: 'Title is sentence case no period',
children: "Description shouldn't repeat title. 1-3 lines.",
actionButtonLabel: 'Action',
startAccessory: <Icon name={ICON_NAMES.INFO_FILLED} size={SIZES.LG} />,
startAccessory: <Icon name={ICON_NAMES.INFO} size={SIZES.LG} />,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Before
Screenshot 2023-01-24 at 2 53 27 PM

After
Screenshot 2023-01-24 at 2 53 35 PM

};

DefaultStory.storyName = 'Default';
Expand Down Expand Up @@ -165,5 +165,5 @@ StartAccessory.args = {
title: 'Start accessory demo',
children:
'The info icon on the left is passed through the startAccessory prop',
startAccessory: <Icon name={ICON_NAMES.INFO_FILLED} size={SIZES.LG} />,
startAccessory: <Icon name={ICON_NAMES.INFO} size={SIZES.LG} />,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Before
Screenshot 2023-01-24 at 2 53 27 PM

After
Screenshot 2023-01-24 at 2 53 35 PM

};
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,7 @@ describe('BannerBase', () => {
const { getByTestId } = render(
<BannerBase
startAccessory={
<Icon
data-testid="start-accessory"
name={ICON_NAMES.ADD_SQUARE_FILLED}
/>
<Icon data-testid="start-accessory" name={ICON_NAMES.ADD_SQUARE} />
}
/>,
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ describe('ButtonBase', () => {
const { getByTestId } = render(
<ButtonBase
data-testid="icon"
iconName="add-square-filled"
iconName="add-square"
iconProps={{ 'data-testid': 'base-button-icon' }}
/>,
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ describe('ButtonLink', () => {
});
it('should render with icon', () => {
const { container } = render(
<ButtonLink data-testid="icon" iconName="add-square-filled" />,
<ButtonLink data-testid="icon" iconName="add-square" />,
);

const icons = container.getElementsByClassName('mm-icon').length;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ describe('ButtonPrimary', () => {
});
it('should render with icon', () => {
const { container } = render(
<ButtonPrimary data-testid="icon" iconName="add-square-filled" />,
<ButtonPrimary data-testid="icon" iconName="add-square" />,
);

const icons = container.getElementsByClassName('mm-icon').length;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ describe('ButtonSecondary', () => {
});
it('should render with icon', () => {
const { container } = render(
<ButtonSecondary data-testid="icon" iconName="add-square-filled" />,
<ButtonSecondary data-testid="icon" iconName="add-square" />,
);

const icons = container.getElementsByClassName('mm-icon').length;
Expand Down
2 changes: 1 addition & 1 deletion ui/components/component-library/button/button.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ describe('Button', () => {
const { getByTestId } = render(
<Button
data-testid="icon"
iconName="add-square-filled"
iconName="add-square"
iconProps={{ 'data-testid': 'base-button-icon' }}
>
Button
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ export default function PrivacySettings() {
e.preventDefault();
dispatch(showModal({ name: 'ONBOARDING_ADD_NETWORK' }));
}}
icon={<Icon name="add-outline" marginRight={2} />}
icon={<Icon name="add" marginRight={2} />}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Before
Screenshot 2023-01-24 at 2 56 24 PM

After
Screenshot 2023-01-24 at 2 56 41 PM

>
{t('onboardingAdvancedPrivacyNetworkButton')}
</Button>
Expand Down