Skip to content
This repository has been archived by the owner on Jun 26, 2023. It is now read-only.

Commit

Permalink
Properly style faucet button.
Browse files Browse the repository at this point in the history
  • Loading branch information
conqeror committed Jan 11, 2021
1 parent a6192cd commit a75d8a2
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 13 deletions.
13 changes: 7 additions & 6 deletions src/antd-overrides/button.scss
Expand Up @@ -199,8 +199,9 @@ $transition: all $transition-duration cubic-bezier(0.645, 0.045, 0.355, 1);
}

.main-buttons {
$button-width: 125px;
$min-button-width: 125px;
$space-between: 10px;
$vertical-padding: 15px;

position: absolute;
right: 0;
Expand All @@ -209,7 +210,7 @@ $transition: all $transition-duration cubic-bezier(0.645, 0.045, 0.355, 1);
display: inline-block;
position: relative;
z-index: 1;
width: $button-width;
min-width: $min-button-width;
height: $button-height;
margin-right: $diagonal-part-width + $space-between;
font-size: $font-size-s;
Expand All @@ -220,21 +221,21 @@ $transition: all $transition-duration cubic-bezier(0.645, 0.045, 0.355, 1);
}

.left-diagonal {
padding: 0 0 0 15px;
padding: 0 0 0 $vertical-padding;

&::after {
@extend %diagonal-before-after-common;
right: -15px;
right: -$vertical-padding;
border-left: none !important;
}
}

.right-diagonal {
padding: 0 15px 0 0;
padding: 0 $vertical-padding 0 0;

&::before {
@extend %diagonal-before-after-common;
left: -15px;
left: -$vertical-padding;
border-right: none !important;
}
}
Expand Down
13 changes: 9 additions & 4 deletions src/layout/Sidebar.scss
Expand Up @@ -124,10 +124,6 @@
}

.balance-wrapper {
.faucet-button {
margin-top: 10px;
}

.BalanceDisplay {
.balances {
.label {
Expand All @@ -147,6 +143,15 @@
}
}

.main-buttons {
position: relative;
margin-top: 50px;

.faucet-button {
width: 220px;
}
}

.footer {
position: absolute;
bottom: 0;
Expand Down
6 changes: 3 additions & 3 deletions src/layout/Sidebar.tsx
Expand Up @@ -129,12 +129,12 @@ export const Sidebar = (): JSX.Element => {
{walletState.walletStatus === 'LOADED' && (
<>
<BalanceDisplay availableBalance={walletState.getOverviewProps().availableBalance} />
<div className="faucet-button">
<div className="main-buttons">
{networkName === 'testnet-internal-nomad' && (
<Button
data-testid="faucet-button"
type="default"
className="action"
type="primary"
className="faucet-button action left-diagonal"
{...fillActionHandlers((): void => {
shell.openExternal(FAUCET_URL)
})}
Expand Down

0 comments on commit a75d8a2

Please sign in to comment.