Skip to content

Commit

Permalink
ui(Jar): same font size for available and frozen balance
Browse files Browse the repository at this point in the history
  • Loading branch information
theborakompanioni committed Nov 29, 2023
1 parent 6855c15 commit 46ed9bb
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 14 deletions.
28 changes: 20 additions & 8 deletions src/components/Balance.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,35 @@
color: var(--jam-balance-color);
}

.frozenSymbol {
order: -2;
.hideSymbol {
padding-left: 0.1em;
color: var(--jam-balance-deemphasize-color);
}

.bitcoinSymbol {
padding-right: 0.1em;
order: -1;
width: 1em;
padding-right: 0.1em;
}

.satsSymbol {
padding-right: 0.1em;
order: 6;
order: 5;
}

.hideSymbol {
padding-left: 0.1em;
color: var(--jam-balance-deemphasize-color);
.frozenSymbol {
order: 5;
}
.bitcoinAmount + .frozenSymbol {
order: -2;
width: 1em;
height: 1em;
}

.frozenSymbol,
.bitcoinSymbol,
.satsSymbol {
display: flex;
justify-content: center;
}

.bitcoinAmount .fractionalPart :nth-child(3)::before,
Expand Down
4 changes: 2 additions & 2 deletions src/components/Balance.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { PropsWithChildren, MouseEventHandler, useCallback, useEffect, useMemo, useState } from 'react'
import { PropsWithChildren, MouseEventHandler, useEffect, useMemo, useState } from 'react'
import classNames from 'classnames'
import Sprite from './Sprite'
import { SATS, BTC, btcToSats, satsToBtc, isValidNumber, formatBtc, formatSats } from '../utils'
Expand Down Expand Up @@ -53,9 +53,9 @@ const BalanceComponent = ({
[styles.frozen]: frozen,
})}
>
{frozen && FROZEN_SYMBOL}
{children}
{showSymbol && symbol}
{frozen && FROZEN_SYMBOL}
</span>
)
}
Expand Down
4 changes: 0 additions & 4 deletions src/components/jars/Jar.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,6 @@
font-size: 0.8rem;
}

.frozen.jarBalance {
font-size: 0.7rem;
}

.selectableJarContainer {
display: flex;
flex-direction: column;
Expand Down

0 comments on commit 46ed9bb

Please sign in to comment.