import * as React from "react" ; import { Button , Classes , Dialog } from "@blueprintjs/core" ; import { IconNames } from "@blueprintjs/icons" ; import { ExampleCard } from "./ExampleCard" ; export interface DialogExampleProps { className ? : string ; } export interface DialogExampleState { isOpen : boolean ; } export class DialogExample extends React . PureComponent < DialogExampleProps , DialogExampleState > { public state : DialogExampleState = { isOpen : false } ; private toggleDialog = ( ) => this . setState ( { isOpen : ! this . state . isOpen } ) ; public render ( ) { return ( < ExampleCard label = "Dialog" > < Button onClick = { this . toggleDialog } text = "Show dialog" / > < Dialog className = { this . props . className } isOpen = { this . state . isOpen } onClose = { this . toggleDialog } icon = { IconNames . INFO_SIGN } title = "Dialog header" > < div className = { Classes . DIALOG_BODY } > Lorem ipsum dolor sit amet , consectetur adipiscing elit , sed do eiusmod tempor incididunt ut labore et dolore magna aliqua . Ut enim ad minim veniam , quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat < /div> < /Dialog> < /ExampleCard>); } }