File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -36,6 +36,8 @@ const AppMenuItem = ({
3636 open = { dialogOpen }
3737 onClose = { handleCloseDialog }
3838 message = "Hello from the Simple Menu app! (AppMenuItem)"
39+ linkText = "App developer guide"
40+ linkUrl = "https://github.com/cytoscape/cytoscape-web/wiki"
3941 />
4042 </ >
4143 )
Original file line number Diff line number Diff line change @@ -5,23 +5,40 @@ import DialogContent from '@mui/material/DialogContent'
55import DialogContentText from '@mui/material/DialogContentText'
66import DialogActions from '@mui/material/DialogActions'
77import Button from '@mui/material/Button'
8+ import { Box } from '@mui/material'
89
910interface MessageDialogProps {
1011 open : boolean
1112 onClose : ( ) => void
1213 message : string
14+ linkText ?: string
15+ linkUrl ?: string
1316}
1417
1518const MessageDialog : React . FC < MessageDialogProps > = ( {
1619 open,
1720 onClose,
1821 message,
22+ linkText,
23+ linkUrl,
1924} ) => {
2025 return (
2126 < Dialog open = { open } onClose = { onClose } >
2227 < DialogTitle > Simple Menu App</ DialogTitle >
2328 < DialogContent >
24- < DialogContentText > { message } </ DialogContentText >
29+ < DialogContentText >
30+ < Box sx = { { p : '1em' } } > { message } </ Box >
31+ < Box sx = { { p : '1em' } } >
32+ { linkText && linkUrl && (
33+ < >
34+ { ' ' }
35+ < a href = { linkUrl } target = "_blank" rel = "noopener noreferrer" >
36+ { linkText }
37+ </ a >
38+ </ >
39+ ) }
40+ </ Box >
41+ </ DialogContentText >
2542 </ DialogContent >
2643 < DialogActions >
2744 < Button onClick = { onClose } color = "primary" >
You can’t perform that action at this time.
0 commit comments