clawchain/dex-app/modules/governance/components/form/GovProposalFormFooter.tsx
2026-05-15 19:18:10 +03:00

46 lines
999 B
TypeScript

import React, { FC } from "react";
import { Box } from "@chakra-ui/react";
import { StdFee as Fee } from "@cosmjs/stargate";
import CommonFooter, { ConfirmButton } from "components/CommonFooter";
type Props = {
fee?: Fee | undefined;
feeIsLoading?: boolean;
balanceError?: boolean;
txFeeNotEnough?: boolean;
};
const GovProposalFormFooter: FC<Props> = ({
fee,
feeIsLoading,
balanceError,
txFeeNotEnough,
}) => {
const confirmButton: ConfirmButton = {
title: "Submit Proposal",
borderRadius: "md",
variant: "primarywhite",
isLoading: !!feeIsLoading,
isDisabled: !!(balanceError || feeIsLoading || txFeeNotEnough),
type: "submit",
};
return (
<Box
bg="brand.defaultTable"
py="1"
px={["4", "8"]}
m="5"
borderWidth="none"
borderRadius="xl"
position="relative"
color="white"
>
<CommonFooter fee={fee} confirmButton={confirmButton} />
</Box>
);
};
export default GovProposalFormFooter;