Skip to content

Commit acbe400

Browse files
committed
fix(web): connect button not being 45px height in staking flow
1 parent 6d1201c commit acbe400

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

web/src/pages/Courts/CourtDetails/StakePanel/InputDisplay.tsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,13 @@ const InputFieldAndButton = styled.div`
4141
width: 100%;
4242
`;
4343

44+
const EnsureChainContainer = styled.div`
45+
button {
46+
height: 45px;
47+
border: 1px solid ${({ theme }) => theme.stroke};
48+
}
49+
`;
50+
4451
interface IInputDisplay {
4552
action: ActionType;
4653
isSending: boolean;
@@ -111,7 +118,7 @@ const InputDisplay: React.FC<IInputDisplay> = ({
111118
// }
112119
formatter={(number: string) => commify(roundNumberDown(Number(number)))}
113120
/>
114-
<EnsureChain>
121+
<EnsureChainContainer>
115122
<StakeWithdrawButton
116123
{...{
117124
parsedAmount,
@@ -122,7 +129,7 @@ const InputDisplay: React.FC<IInputDisplay> = ({
122129
setIsPopupOpen,
123130
}}
124131
/>
125-
</EnsureChain>
132+
</EnsureChainContainer>
126133
</InputFieldAndButton>
127134
</InputArea>
128135
</>

web/src/pages/Courts/CourtDetails/StakePanel/StakeWithdrawButton.tsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import React, { useMemo } from "react";
2-
import styled from "styled-components";
32
import { useParams } from "react-router-dom";
43
import { useAccount, usePublicClient } from "wagmi";
54
import { Button } from "@kleros/ui-components-library";
@@ -18,11 +17,6 @@ import { wrapWithToast } from "utils/wrapWithToast";
1817
import { isUndefined } from "utils/index";
1918
import { EnsureChain } from "components/EnsureChain";
2019

21-
const StyledStakeWithdrawButton = styled(Button)`
22-
border: 1px solid ${({ theme }) => theme.stroke};
23-
height: 45px;
24-
`;
25-
2620
export enum ActionType {
2721
allowance = "allowance",
2822
stake = "stake",
@@ -135,7 +129,7 @@ const StakeWithdrawButton: React.FC<IActionButton> = ({
135129
const { text, checkDisabled, onClick } = buttonProps[isAllowance ? ActionType.allowance : action];
136130
return (
137131
<EnsureChain>
138-
<StyledStakeWithdrawButton
132+
<Button
139133
text={text}
140134
isLoading={isSending}
141135
disabled={

0 commit comments

Comments
 (0)