2019-03-15 12:35:36 +00:00
|
|
|
import * as React from "react";
|
|
|
|
|
import { IComponentProps } from "./BaseComponent";
|
|
|
|
|
import { Icon, Intent } from "@blueprintjs/core";
|
|
|
|
|
import { IconName } from "@blueprintjs/icons";
|
2019-03-16 10:59:42 +00:00
|
|
|
import PositionContainer from "./PositionContainer";
|
2019-03-15 12:35:36 +00:00
|
|
|
|
|
|
|
|
class IconComponent extends React.Component<IIconComponentProps> {
|
|
|
|
|
render() {
|
|
|
|
|
return (
|
2019-03-16 10:59:42 +00:00
|
|
|
<PositionContainer {...this.props}>
|
2019-03-16 11:38:22 +00:00
|
|
|
<Icon
|
|
|
|
|
icon={this.props.icon}
|
|
|
|
|
iconSize={this.props.iconSize}
|
|
|
|
|
intent={this.props.intent}
|
|
|
|
|
/>
|
2019-03-16 10:59:42 +00:00
|
|
|
</PositionContainer>
|
2019-03-15 12:35:36 +00:00
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface IIconComponentProps extends IComponentProps {
|
|
|
|
|
iconSize?: number;
|
|
|
|
|
icon?: IconName;
|
2019-03-16 11:38:22 +00:00
|
|
|
intent?: Intent;
|
2019-03-15 12:35:36 +00:00
|
|
|
ellipsize?: boolean;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default IconComponent;
|