diff options
| author | Wolfboy248 <105884620+Wolfboy248@users.noreply.github.com> | 2024-10-20 00:27:38 +0200 |
|---|---|---|
| committer | Wolfboy248 <105884620+Wolfboy248@users.noreply.github.com> | 2024-10-20 00:27:38 +0200 |
| commit | 8c8edfc9c8bb1a0fa3d1e02aab576044857f1c95 (patch) | |
| tree | cf23b52befb9af6d16321b9e9031ace724543875 /frontend/src/components/MessageDialog.tsx | |
| parent | backend: actually fix download demo (diff) | |
| download | lphub-8c8edfc9c8bb1a0fa3d1e02aab576044857f1c95.tar.gz lphub-8c8edfc9c8bb1a0fa3d1e02aab576044857f1c95.tar.bz2 lphub-8c8edfc9c8bb1a0fa3d1e02aab576044857f1c95.zip | |
refactor: custom modals
Diffstat (limited to 'frontend/src/components/MessageDialog.tsx')
| -rw-r--r-- | frontend/src/components/MessageDialog.tsx | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/frontend/src/components/MessageDialog.tsx b/frontend/src/components/MessageDialog.tsx new file mode 100644 index 0000000..0a8db42 --- /dev/null +++ b/frontend/src/components/MessageDialog.tsx | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | import React from 'react'; | ||
| 2 | |||
| 3 | import "../css/Dialog.css" | ||
| 4 | |||
| 5 | interface MessageDialogProps { | ||
| 6 | title: string; | ||
| 7 | subtitle: string; | ||
| 8 | onClose: () => void; | ||
| 9 | }; | ||
| 10 | |||
| 11 | const MessageDialog: React.FC<MessageDialogProps> = ({ title, subtitle, onClose }) => { | ||
| 12 | return ( | ||
| 13 | <div className='dimmer'> | ||
| 14 | <div className='dialog'> | ||
| 15 | <div className='dialog-element dialog-header'> | ||
| 16 | <span>{title}</span> | ||
| 17 | </div> | ||
| 18 | <div className='dialog-element dialog-description'> | ||
| 19 | <span>{subtitle}</span> | ||
| 20 | </div> | ||
| 21 | <div className='dialog-element dialog-btns-container'> | ||
| 22 | <button onClick={onClose}>Ok</button> | ||
| 23 | </div> | ||
| 24 | </div> | ||
| 25 | </div> | ||
| 26 | ) | ||
| 27 | } | ||
| 28 | |||
| 29 | export default MessageDialog; | ||