12345678910111213141516171819202122232425262728293031323334353637383940import React,{ ReactElement }from"react";import{ Button }from"@react-md/button";import{
Dialog,
DialogHeader,
DialogTitle,
DialogContent,
DialogFooter,}from"@react-md/dialog";import{ Text }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><Textmargin="none">This is some text in a dialog.</Text></DialogContent><DialogFooter><Buttonid="dialog-close"onClick={disable}>
Close
</Button></DialogFooter></Dialog></>);}