2019-09-09 09:08:54 +00:00
|
|
|
import * as React from "react";
|
|
|
|
|
import { ComponentProps } from "./BaseComponent";
|
|
|
|
|
import { Callout, Intent } from "@blueprintjs/core";
|
|
|
|
|
import { Container } from "./ContainerComponent";
|
|
|
|
|
class CalloutComponent extends React.Component<CalloutComponentProps> {
|
2019-03-13 15:55:53 +00:00
|
|
|
render() {
|
|
|
|
|
return (
|
2019-03-21 12:10:32 +00:00
|
|
|
<Container {...this.props}>
|
2019-03-15 12:35:36 +00:00
|
|
|
<Callout
|
|
|
|
|
title={this.props.title ? this.props.title : undefined}
|
2019-03-16 11:38:22 +00:00
|
|
|
intent={this.props.intent}
|
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-21 12:10:32 +00:00
|
|
|
</Container>
|
2019-09-09 09:08:54 +00:00
|
|
|
);
|
2019-03-13 15:55:53 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2019-09-09 09:08:54 +00:00
|
|
|
export interface CalloutComponentProps extends ComponentProps {
|
|
|
|
|
id?: string;
|
|
|
|
|
title?: string;
|
|
|
|
|
description?: string;
|
|
|
|
|
intent?: Intent;
|
|
|
|
|
ellipsize?: boolean;
|
2019-03-13 15:55:53 +00:00
|
|
|
}
|
|
|
|
|
|
2019-09-09 09:08:54 +00:00
|
|
|
export default CalloutComponent;
|