PromucFlow_constructor/app/client/src/editorComponents/CalloutComponent.tsx

31 lines
775 B
TypeScript
Raw Normal View History

2019-03-13 15:55:53 +00:00
import * as React from "react";
import { IComponentProps } from "./BaseComponent";
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 (
<PositionContainer {...this.props}>
<Callout
{...this.props}
title={this.props.title ? this.props.title : undefined}
2019-03-16 11:33:15 +00:00
intent={"primary"}
>
2019-03-13 15:55:53 +00:00
{this.props.description}
</Callout>
</PositionContainer>
2019-03-13 15:55:53 +00:00
);
}
}
export interface ICalloutComponentProps extends IComponentProps {
id?: string;
title?: string;
2019-03-13 15:55:53 +00:00
description?: string;
intent?: Intent;
2019-03-13 15:55:53 +00:00
ellipsize?: boolean;
}
export default CalloutComponent;