PromucFlow_constructor/app/client/src/components/designSystems/blueprint/IconComponent.tsx

25 lines
619 B
TypeScript
Raw Normal View History

2019-09-09 09:08:54 +00:00
import * as React from "react";
2019-11-25 05:07:27 +00:00
import { ComponentProps } from "components/designSystems/appsmith/BaseComponent";
2019-09-09 09:08:54 +00:00
import { Icon, Intent } from "@blueprintjs/core";
import { IconName } from "@blueprintjs/icons";
2019-08-29 11:22:09 +00:00
class IconComponent extends React.Component<IconComponentProps> {
render() {
return (
<Icon
icon={this.props.icon}
iconSize={this.props.iconSize}
intent={this.props.intent}
/>
2019-09-09 09:08:54 +00:00
);
}
}
2019-09-05 17:47:50 +00:00
export interface IconComponentProps extends ComponentProps {
2019-08-29 11:22:09 +00:00
iconSize?: number;
icon?: IconName;
intent?: Intent;
ellipsize?: boolean;
}
2019-09-09 09:08:54 +00:00
export default IconComponent;