-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ac95659
commit 97ceaca
Showing
4 changed files
with
83 additions
and
9 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
import { | ||
Button, | ||
Dialog, | ||
DialogBody, | ||
DialogFooter, | ||
DialogHeader, | ||
Text, | ||
} from "@babylonlabs-io/bbn-core-ui"; | ||
|
||
import { getNetworkConfig } from "@/config/network.config"; | ||
interface UnbondModalProps { | ||
open: boolean; | ||
onClose: () => void; | ||
onProceed: () => void; | ||
awaitingWalletResponse: boolean; | ||
} | ||
|
||
const { networkName } = getNetworkConfig(); | ||
|
||
export const WithdrawModalV2 = ({ | ||
open, | ||
onClose, | ||
onProceed, | ||
awaitingWalletResponse, | ||
}: UnbondModalProps) => { | ||
const title = "Withdraw"; | ||
const content = ( | ||
<> | ||
You are about to withdraw your stake. <br /> A transaction fee will be | ||
deduced from your stake by the {networkName} network | ||
</> | ||
); | ||
|
||
return ( | ||
<Dialog open={open} onClose={onClose}> | ||
<DialogHeader className="text-primary-main" onClose={onClose}> | ||
{title} | ||
</DialogHeader> | ||
<DialogBody className="pb-8 pt-4 text-primary-dark"> | ||
<Text variant="body1">{content}</Text> | ||
</DialogBody> | ||
<DialogFooter className="flex gap-4"> | ||
<Button | ||
variant="outlined" | ||
color="primary" | ||
onClick={onClose} | ||
className="flex-1" | ||
> | ||
Cancel | ||
</Button> | ||
<Button variant="contained" onClick={onProceed} className="flex-1"> | ||
{awaitingWalletResponse ? ( | ||
<span className="loading loading-spinner loading-xs text-white" /> | ||
) : ( | ||
"Proceed" | ||
)} | ||
</Button> | ||
</DialogFooter> | ||
</Dialog> | ||
); | ||
}; |
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