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

29 lines
724 B
TypeScript
Raw Normal View History

2019-03-21 12:10:32 +00:00
import * as React from "react"
2019-09-05 17:47:50 +00:00
import { ComponentProps } from "./BaseComponent"
2019-03-21 12:10:32 +00:00
import { Callout, Intent } from "@blueprintjs/core"
import { Container } from "./ContainerComponent"
2019-03-13 15:55:53 +00:00
class CalloutComponent extends React.Component<ICalloutComponentProps> {
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-03-13 15:55:53 +00:00
}
}
2019-09-05 17:47:50 +00:00
export interface ICalloutComponentProps extends ComponentProps {
2019-03-21 12:10:32 +00:00
id?: string
title?: string
description?: string
intent?: Intent
ellipsize?: boolean
2019-03-13 15:55:53 +00:00
}
2019-03-21 12:10:32 +00:00
export default CalloutComponent