Skip to content

Commit

Permalink
Merge pull request #307 from pendulum-chain/306-bug-jumping-button-sizes
Browse files Browse the repository at this point in the history
Make main buttons 50% width
  • Loading branch information
TorstenStueber authored Nov 27, 2024
2 parents de4c604 + 9e1ce1f commit 6f852cd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/components/buttons/SwapSubmitButton/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const SwapSubmitButton: FC<SwapSubmitButtonProps> = ({ text, disabled, pe

if (!isConnected) {
return (
<div className="grow">
<div style={{ flex: '1 1 calc(50% - 0.75rem/2)' }}>
<button onClick={() => openWalletModal()} type="button" className="w-full btn-vortex-primary btn rounded-xl">
Connect Wallet
</button>
Expand All @@ -26,7 +26,7 @@ export const SwapSubmitButton: FC<SwapSubmitButtonProps> = ({ text, disabled, pe
}

return (
<div className="grow">
<div style={{ flex: '1 1 calc(50% - 0.75rem/2)' }}>
<button className="w-full btn-vortex-primary btn" disabled={showInDisabledState}>
{pending && <Spinner />}
{text}
Expand Down
6 changes: 4 additions & 2 deletions src/pages/swap/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,8 @@ export const SwapPage = () => {
</section>
<div className="flex mt-5 gap-3">
<button
className="grow btn-vortex-secondary btn"
className="btn-vortex-secondary btn"
style={{ flex: '1 1 calc(50% - 0.75rem/2)' }}
disabled={!inputAmountIsStable}
onClick={(e) => {
e.preventDefault();
Expand All @@ -413,7 +414,8 @@ export const SwapPage = () => {
href={firstSep24ResponseState.url}
target="_blank"
rel="opener" //noopener forbids the use of postMessages.
className="grow btn-vortex-primary btn rounded-xl"
className="btn-vortex-primary btn rounded-xl"
style={{ flex: '1 1 calc(50% - 0.75rem/2)' }}
onClick={handleOnAnchorWindowOpen}
// open in a tinier window
>
Expand Down

0 comments on commit 6f852cd

Please sign in to comment.