2019-09-09 09:08:54 +00:00
|
|
|
import * as React from "react";
|
|
|
|
|
import { ComponentProps } from "./BaseComponent";
|
|
|
|
|
import { Icon, Intent } from "@blueprintjs/core";
|
|
|
|
|
import { IconName } from "@blueprintjs/icons";
|
|
|
|
|
import { Container } from "./ContainerComponent";
|
2019-08-29 11:22:09 +00:00
|
|
|
class IconComponent extends React.Component<IconComponentProps> {
|
2019-03-15 12:35:36 +00:00
|
|
|
render() {
|
|
|
|
|
return (
|
2019-03-21 12:10:32 +00:00
|
|
|
<Container {...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-21 12:10:32 +00:00
|
|
|
</Container>
|
2019-09-09 09:08:54 +00:00
|
|
|
);
|
2019-03-15 12:35:36 +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-03-15 12:35:36 +00:00
|
|
|
}
|
|
|
|
|
|
2019-09-09 09:08:54 +00:00
|
|
|
export default IconComponent;
|