Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fidelity bonds jar selecotor spacing #417

Merged
1 commit merged into from
Jul 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions src/components/Balance.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const BalanceComponent = ({ symbol, value, symbolIsPrefix }) => {
return (
<span className="d-inline-flex align-items-center">
{symbolIsPrefix && symbol}
<span className="d-inline-flex align-items-center slashed-zeroes">{value}</span>
<span className="d-inline-flex align-items-center slashed-zeroes balance-value">{value}</span>
{!symbolIsPrefix && symbol}
</span>
)
Expand Down Expand Up @@ -101,8 +101,12 @@ export default function Balance({
// Treat decimal numbers as btc.
const valueIsBtc = !valueIsSats && !Number.isNaN(Number.parseFloat(valueString)) && valueString.indexOf('.') > -1

const btcSymbol = <span style={{ paddingRight: '0.1em' }}>{'\u20BF'}</span>
const satSymbol = <Sprite symbol="sats" width="1.2em" height="1.2em" />
const btcSymbol = (
<span className="balance-symbol" style={{ paddingRight: '0.1em' }}>
{'\u20BF'}
</span>
)
const satSymbol = <Sprite className="balance-symbol" symbol="sats" width="1.2em" height="1.2em" />

if (valueIsBtc && displayMode === DISPLAY_MODE_BTC)
return <BalanceComponent symbol={btcSymbol} value={formatBtc(valueString)} symbolIsPrefix={true} />
Expand Down
25 changes: 25 additions & 0 deletions src/components/fb/FidelityBondSteps.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,31 @@
color: var(--bs-gray-600);
}

.jarsContainer {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
gap: 2rem;
}

.jarsContainer :global .balance-value {
font-size: 0.7rem;
}

.jarsContainer :global .balance-symbol {
font-size: 0.7rem;
}

@media only screen and (min-width: 768px) {
.jarsContainer {
flex-direction: row;
justify-content: space-around;
gap: 0.5rem;
flex-wrap: wrap;
}
}

.utxoCard {
display: flex;
align-items: center;
Expand Down
2 changes: 1 addition & 1 deletion src/components/fb/FidelityBondSteps.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ const SelectJar = ({ accountBalances, totalBalance, utxos, selectedJar, onJarSel
return (
<div className="d-flex flex-column gap-4">
<div className={styles.stepDescription}>{t('earn.fidelity_bond.select_jar.description')}</div>
<div className="d-flex justify-content-between">
<div className={styles.jarsContainer}>
{sortedAccountBalances.map((account, index) => (
<SelectableJar
key={index}
Expand Down