diff options
| author | FifthWit <fifthwitbusiness@gmail.com> | 2025-01-30 10:44:30 -0600 |
|---|---|---|
| committer | FifthWit <fifthwitbusiness@gmail.com> | 2025-01-30 10:44:30 -0600 |
| commit | e40f07211f5f15dcb138e2520a76d13afd3c0cfd (patch) | |
| tree | 46bad6a17e66d55a4a65088c0b6eb8c48641615a /frontend/src/components/ConfirmDialog.tsx | |
| parent | added prettier for more consistency (diff) | |
| download | lphub-e40f07211f5f15dcb138e2520a76d13afd3c0cfd.tar.gz lphub-e40f07211f5f15dcb138e2520a76d13afd3c0cfd.tar.bz2 lphub-e40f07211f5f15dcb138e2520a76d13afd3c0cfd.zip | |
formatted with prettier
Diffstat (limited to 'frontend/src/components/ConfirmDialog.tsx')
| -rw-r--r-- | frontend/src/components/ConfirmDialog.tsx | 49 |
1 files changed, 27 insertions, 22 deletions
diff --git a/frontend/src/components/ConfirmDialog.tsx b/frontend/src/components/ConfirmDialog.tsx index 44a653b..925118d 100644 --- a/frontend/src/components/ConfirmDialog.tsx +++ b/frontend/src/components/ConfirmDialog.tsx | |||
| @@ -1,31 +1,36 @@ | |||
| 1 | import React from 'react'; | 1 | import React from 'react'; |
| 2 | 2 | ||
| 3 | import "@css/Dialog.css" | 3 | import '@css/Dialog.css'; |
| 4 | 4 | ||
| 5 | interface ConfirmDialogProps { | 5 | interface ConfirmDialogProps { |
| 6 | title: string; | 6 | title: string; |
| 7 | subtitle: string; | 7 | subtitle: string; |
| 8 | onConfirm: () => void; | 8 | onConfirm: () => void; |
| 9 | onCancel: () => void; | 9 | onCancel: () => void; |
| 10 | }; | 10 | } |
| 11 | 11 | ||
| 12 | const ConfirmDialog: React.FC<ConfirmDialogProps> = ({ title, subtitle, onConfirm, onCancel }) => { | 12 | const ConfirmDialog: React.FC<ConfirmDialogProps> = ({ |
| 13 | return ( | 13 | title, |
| 14 | <div className='dimmer'> | 14 | subtitle, |
| 15 | <div className='dialog'> | 15 | onConfirm, |
| 16 | <div className='dialog-element dialog-header'> | 16 | onCancel, |
| 17 | <span>{title}</span> | 17 | }) => { |
| 18 | </div> | 18 | return ( |
| 19 | <div className='dialog-element dialog-description'> | 19 | <div className="dimmer"> |
| 20 | <span>{subtitle}</span> | 20 | <div className="dialog"> |
| 21 | </div> | 21 | <div className="dialog-element dialog-header"> |
| 22 | <div className='dialog-element dialog-btns-container'> | 22 | <span>{title}</span> |
| 23 | <button onClick={onCancel}>Cancel</button> | 23 | </div> |
| 24 | <button onClick={onConfirm}>Confirm</button> | 24 | <div className="dialog-element dialog-description"> |
| 25 | </div> | 25 | <span>{subtitle}</span> |
| 26 | </div> | 26 | </div> |
| 27 | <div className="dialog-element dialog-btns-container"> | ||
| 28 | <button onClick={onCancel}>Cancel</button> | ||
| 29 | <button onClick={onConfirm}>Confirm</button> | ||
| 27 | </div> | 30 | </div> |
| 28 | ) | 31 | </div> |
| 32 | </div> | ||
| 33 | ); | ||
| 29 | }; | 34 | }; |
| 30 | 35 | ||
| 31 | export default ConfirmDialog; | 36 | export default ConfirmDialog; |