Skip to content

Commit

Permalink
fix icon names (#17391)
Browse files Browse the repository at this point in the history
  • Loading branch information
garrettbear authored Jan 25, 2023
1 parent d2331c0 commit 23133a2
Show file tree
Hide file tree
Showing 13 changed files with 16 additions and 23 deletions.
8 changes: 2 additions & 6 deletions ui/components/app/collectible-details/collectible-details.js
Original file line number Diff line number Diff line change
Expand Up @@ -277,9 +277,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
}
/>
</Box>
Expand Down Expand Up @@ -334,9 +332,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
}
/>
</Box>
Expand Down
2 changes: 1 addition & 1 deletion ui/components/app/flask/snap-delineator/snap-delineator.js
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} />
<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} />}
>
The info icon on the left is passed through the startAccessory prop
</BannerBase>;
Expand Down
2 changes: 1 addition & 1 deletion ui/components/component-library/banner-base/banner-base.js
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}
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} />,
};

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} />,
};
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} />}
>
{t('onboardingAdvancedPrivacyNetworkButton')}
</Button>
Expand Down

0 comments on commit 23133a2

Please sign in to comment.