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

29 lines
733 B
TypeScript
Raw Normal View History

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}>
<Callout
title={this.props.title ? this.props.title : undefined}
2019-03-16 11:38:22 +00:00
intent={this.props.intent}
>
2019-03-13 15:55:53 +00:00
{this.props.description}
</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;