importtype{ ReactElement }from"react";import{ Button }from"@react-md/button";import{
Dialog,
DialogHeader,
DialogTitle,
DialogContent,
DialogFooter,}from"@react-md/dialog";import{ Typography }from"@react-md/typography";import{ useToggle }from"@react-md/utils";exportdefaultfunctionDemo(): ReactElement {const[visible, enable, disable]=useToggle(false);return(<><Buttonid="simple-dialog-toggle"onClick={enable}>
Show Dialog
</Button><Dialogid="simple-dialog"visible={visible}onRequestClose={disable}aria-labelledby="dialog-title"><DialogHeader><DialogTitleid="dialog-title">Simple Dialog</DialogTitle></DialogHeader><DialogContent><Typographymargin="none">This is some text in a dialog.</Typography></DialogContent><DialogFooter><Buttonid="dialog-close"onClick={disable}>
Close
</Button></DialogFooter></Dialog></>);}