2019-03-13 15:55:53 +00:00
|
|
|
import * as React from "react";
|
|
|
|
|
import { IComponentProps } from "./BaseComponent";
|
2019-03-16 10:59:42 +00:00
|
|
|
import PositionContainer from "./PositionContainer";
|
2019-03-16 11:33:15 +00:00
|
|
|
import { Callout, Intent } from "@blueprintjs/core";
|
2019-03-13 15:55:53 +00:00
|
|
|
|
|
|
|
|
class CalloutComponent extends React.Component<ICalloutComponentProps> {
|
|
|
|
|
render() {
|
|
|
|
|
return (
|
2019-03-16 10:59:42 +00:00
|
|
|
<PositionContainer {...this.props}>
|
2019-03-15 12:35:36 +00:00
|
|
|
<Callout
|
|
|
|
|
{...this.props}
|
|
|
|
|
title={this.props.title ? this.props.title : undefined}
|
2019-03-16 11:33:15 +00:00
|
|
|
intent={"primary"}
|
2019-03-15 12:35:36 +00:00
|
|
|
>
|
2019-03-13 15:55:53 +00:00
|
|
|
{this.props.description}
|
2019-03-15 12:35:36 +00:00
|
|
|
</Callout>
|
2019-03-16 10:59:42 +00:00
|
|
|
</PositionContainer>
|
2019-03-13 15:55:53 +00:00
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface ICalloutComponentProps extends IComponentProps {
|
|
|
|
|
id?: string;
|
2019-03-15 12:35:36 +00:00
|
|
|
title?: string;
|
2019-03-13 15:55:53 +00:00
|
|
|
description?: string;
|
2019-03-15 12:35:36 +00:00
|
|
|
intent?: Intent;
|
2019-03-13 15:55:53 +00:00
|
|
|
ellipsize?: boolean;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default CalloutComponent;
|