@@ -50,6 +50,16 @@ export const ConsensusAccountDetailsView: FC<ConsensusAccountDetailsViewProps> =
5050 ? `${ RouteUtils . getValidatorRoute ( account . network , account . entity ) } #${ transactionsContainerId } `
5151 : `${ RouteUtils . getAccountRoute ( account , account . address ) } #${ transactionsContainerId } `
5252
53+ // Workaround to right-align all balance numbers
54+ const longestBalanceWidth = (
55+ < div className = "invisible [&>*]:block [&>*]:h-0" >
56+ < RoundedBalance value = { account . total } ticker = { account . ticker } />
57+ < RoundedBalance value = { account . available } ticker = { account . ticker } />
58+ < RoundedBalance value = { account . delegations_balance } ticker = { account . ticker } />
59+ < RoundedBalance value = { account . debonding_delegations_balance } ticker = { account . ticker } />
60+ </ div >
61+ )
62+
5363 return (
5464 < StyledDescriptionList
5565 className = "grid-cols-[160px_auto] sm:grid-cols-[200px_auto]"
@@ -78,25 +88,29 @@ export const ConsensusAccountDetailsView: FC<ConsensusAccountDetailsViewProps> =
7888 ) }
7989 < dt > { t ( 'account.totalBalance' ) } </ dt >
8090 < dd >
81- < div className = "w-full max-w-[25ex] text-right" >
91+ < div className = "text-right" >
92+ { longestBalanceWidth }
8293 < RoundedBalance value = { account . total } ticker = { account . ticker } />
8394 </ div >
8495 </ dd >
8596 < StyledListTitle > { t ( 'account.available' ) } </ StyledListTitle >
8697 < dd >
87- < div className = "w-full max-w-[25ex] text-right" >
98+ < div className = "text-right" >
99+ { longestBalanceWidth }
88100 < RoundedBalance value = { account . available } ticker = { account . ticker } />
89101 </ div >
90102 </ dd >
91103 < StyledListTitle > { t ( 'common.staked' ) } </ StyledListTitle >
92104 < dd >
93- < div className = "w-full max-w-[25ex] text-right" >
105+ < div className = "text-right" >
106+ { longestBalanceWidth }
94107 < RoundedBalance value = { account . delegations_balance } ticker = { account . ticker } />
95108 </ div >
96109 </ dd >
97110 < StyledListTitle > { t ( 'account.debonding' ) } </ StyledListTitle >
98111 < dd >
99- < div className = "w-full max-w-[25ex] text-right" >
112+ < div className = "text-right" >
113+ { longestBalanceWidth }
100114 < RoundedBalance value = { account . debonding_delegations_balance } ticker = { account . ticker } />
101115 </ div >
102116 </ dd >
0 commit comments