From 2a1384135d16a7b6446ca382a83f907b03df0bc9 Mon Sep 17 00:00:00 2001 From: Harman-singh-waraich Date: Fri, 15 Nov 2024 12:26:29 +0700 Subject: [PATCH 1/2] fix(web): display-stake-button-error --- .../StakePanel/StakeWithdrawButton.tsx | 36 +++++++++++-------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/web/src/pages/Courts/CourtDetails/StakePanel/StakeWithdrawButton.tsx b/web/src/pages/Courts/CourtDetails/StakePanel/StakeWithdrawButton.tsx index 40eda06a7..5c1e86354 100644 --- a/web/src/pages/Courts/CourtDetails/StakePanel/StakeWithdrawButton.tsx +++ b/web/src/pages/Courts/CourtDetails/StakePanel/StakeWithdrawButton.tsx @@ -22,6 +22,7 @@ import { isUndefined } from "utils/index"; import { wrapWithToast } from "utils/wrapWithToast"; import { EnsureChain } from "components/EnsureChain"; +import styled from "styled-components"; export enum ActionType { allowance = "allowance", @@ -29,6 +30,10 @@ export enum ActionType { withdraw = "withdraw", } +const ErrorLabel = styled.label` + color: ${({ theme }) => theme.error}; +`; + interface IActionButton { isSending: boolean; parsedAmount: bigint; @@ -142,20 +147,23 @@ const StakeWithdrawButton: React.FC = ({ const { text, checkDisabled, onClick } = buttonProps[isAllowance ? ActionType.allowance : action]; return ( -