importtype{ ReactElement }from"react";import{ Button }from"@react-md/button";import{ Dialog, DialogHeader, DialogTitle }from"@react-md/dialog";import{ List, ListItem }from"@react-md/list";import{ useToggle }from"@react-md/utils";import styles from"./SimpleListExample.module.scss";exportdefaultfunctionDemo(): ReactElement {const[toggled, enable, disable]=useToggle(false);return(<><Buttonid="dialog-toggle-1"onClick={enable}>
Show Dialog
</Button><Dialogid="dialog-1"visible={toggled}onRequestClose={disable}aria-labelledby="dialog-title"><DialogHeader><DialogTitleid="dialog-title">Example</DialogTitle></DialogHeader><ListclassName={styles.list}onClick={disable}><ListItemid="dialog-item-1">This is the first item</ListItem><ListItemid="dialog-item-2">This is the second item</ListItem><ListItemid="dialog-item-3">This is the third item</ListItem><ListItemid="dialog-item-4">This is the fourth item</ListItem></List></Dialog></>);}