diff --git a/README.md b/README.md index 2f3db6b..0108370 100644 --- a/README.md +++ b/README.md @@ -41,12 +41,10 @@ export default Icon; ```tsx // Icon.tsx -import IcoMoon, { IconComponent } from "react-icomoon"; +import IcoMoon, { IconProps } from "react-icomoon"; const iconSet = require("./selection.json"); -const Icon: typeof IconComponent = (props) => ( - -); +const Icon = (props: IconProps) => ; export default Icon; ``` diff --git a/src/index.tsx b/src/index.tsx index c09e710..f061c2c 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -95,10 +95,6 @@ const IcoMoon = ({ return createElement(SvgComponent || "svg", props, children); }; -type IconType = (props: IconProps) => ReactElement; - -export const IconComponent: IconType = () => null; - export const iconList = (iconSet: IconSet) => { if (!iconSet || !Array.isArray(iconSet.icons)) return null;