-
Notifications
You must be signed in to change notification settings - Fork 200
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[GEN-1621]: add cancel modal & breakdown overview-drawer files (#1682)
- Loading branch information
1 parent
d933798
commit 2c9c79b
Showing
30 changed files
with
741 additions
and
665 deletions.
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
frontend/webapp/components/modals/cancel-warning/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import React from 'react'; | ||
import { WarningModal } from '@/reuseable-components'; | ||
|
||
interface Props { | ||
isOpen: boolean; | ||
name?: string; | ||
onApprove: () => void; | ||
onDeny: () => void; | ||
} | ||
|
||
const CancelWarning: React.FC<Props> = ({ isOpen, name, onApprove, onDeny }) => { | ||
return ( | ||
<WarningModal | ||
isOpen={isOpen} | ||
noOverlay | ||
title={`Cancel${name ? ` ${name}` : ''}`} | ||
description='Are you sure you want to cancel?' | ||
approveButton={{ | ||
text: 'Cancel', | ||
variant: 'warning', | ||
onClick: onApprove, | ||
}} | ||
denyButton={{ | ||
text: 'Go Back', | ||
onClick: onDeny, | ||
}} | ||
/> | ||
); | ||
}; | ||
|
||
export { CancelWarning }; |
73 changes: 0 additions & 73 deletions
73
frontend/webapp/components/modals/delete-entity-modal/index.tsx
This file was deleted.
Oops, something went wrong.
31 changes: 31 additions & 0 deletions
31
frontend/webapp/components/modals/delete-warning/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import React from 'react'; | ||
import { WarningModal } from '@/reuseable-components'; | ||
|
||
interface Props { | ||
isOpen: boolean; | ||
name?: string; | ||
onApprove: () => void; | ||
onDeny: () => void; | ||
} | ||
|
||
const DeleteWarning: React.FC<Props> = ({ isOpen, name, onApprove, onDeny }) => { | ||
return ( | ||
<WarningModal | ||
isOpen={isOpen} | ||
noOverlay | ||
title={`Delete${name ? ` ${name}` : ''}`} | ||
description='Are you sure you want to delete this?' | ||
approveButton={{ | ||
text: 'Delete', | ||
variant: 'danger', | ||
onClick: onApprove, | ||
}} | ||
denyButton={{ | ||
text: 'Cancel', | ||
onClick: onDeny, | ||
}} | ||
/> | ||
); | ||
}; | ||
|
||
export { DeleteWarning }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export * from './cancel-warning'; | ||
export * from './delete-warning'; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.