From 477249057d7c1ceb145ec65d0e6bc7ba4f7dba50 Mon Sep 17 00:00:00 2001 From: Gilad Gray Date: Fri, 2 Feb 2018 12:25:13 -0800 Subject: [PATCH] :fire: remove LegacyIconName usage --- packages/core/src/components/icon/icon.tsx | 4 ++-- packages/core/test/icon/iconTests.tsx | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/core/src/components/icon/icon.tsx b/packages/core/src/components/icon/icon.tsx index b1621c6e44..cbf7c357a1 100644 --- a/packages/core/src/components/icon/icon.tsx +++ b/packages/core/src/components/icon/icon.tsx @@ -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 }; @@ -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. diff --git a/packages/core/test/icon/iconTests.tsx b/packages/core/test/icon/iconTests.tsx index 514196a6d5..62a32d1430 100644 --- a/packages/core/test/icon/iconTests.tsx +++ b/packages/core/test/icon/iconTests.tsx @@ -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"; @@ -24,7 +24,8 @@ describe("", () => { it("renders iconName class", () => assertIcon(, "calendar")); - it("supports prefixed iconName", () => assertIcon(, "airplane")); + // uncomment for compiler error + // it("does not support prefixed iconName", () => assertIcon(, "airplane")); it("iconName=undefined renders nothing", () => { const icon = shallow();