Skip to content

Commit

Permalink
🔥 remove LegacyIconName usage
Browse files Browse the repository at this point in the history
  • Loading branch information
Gilad Gray committed Feb 2, 2018
1 parent dd1013f commit 4772490
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/core/src/components/icon/icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import * as classNames from "classnames";
import * as React from "react";

import { IconName, IconSvgPaths16, IconSvgPaths20, LegacyIconName } from "@blueprintjs/icons";
import { IconName, IconSvgPaths16, IconSvgPaths20 } from "@blueprintjs/icons";
import { Classes, IIntentProps, IProps } from "../../common";

export { IconName };
Expand All @@ -22,7 +22,7 @@ export interface IIconProps extends IIntentProps, IProps {
* Name of the icon (with or without `"pt-icon-"` prefix).
* If omitted or `undefined`, this component will render nothing.
*/
iconName?: LegacyIconName;
iconName?: IconName;

/**
* Size of the icon, in pixels.
Expand Down
5 changes: 3 additions & 2 deletions packages/core/test/icon/iconTests.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { assert } from "chai";
import { shallow } from "enzyme";
import * as React from "react";

import { IconClasses, IconName } from "@blueprintjs/icons";
import { IconName } from "@blueprintjs/icons";

import { Classes, Icon, IIconProps, Intent } from "../../src/index";

Expand All @@ -24,7 +24,8 @@ describe("<Icon>", () => {

it("renders iconName class", () => assertIcon(<Icon iconName="calendar" />, "calendar"));

it("supports prefixed iconName", () => assertIcon(<Icon iconName={IconClasses.AIRPLANE} />, "airplane"));
// uncomment for compiler error
// it("does not support prefixed iconName", () => assertIcon(<Icon iconName="pt-icon-airplane" />, "airplane"));

it("iconName=undefined renders nothing", () => {
const icon = shallow(<Icon iconName={undefined} />);
Expand Down

1 comment on commit 4772490

@blueprint-bot
Copy link

Choose a reason for hiding this comment

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

🔥 remove LegacyIconName usage

Preview: documentation | landing | table

Please sign in to comment.