Skip to content
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
3 changes: 2 additions & 1 deletion apps/explorer/src/comps/AccountCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ export function AccountCard(props: AccountCard.Props) {
)}
</div>
</div>
<p className="text-[14px] font-normal leading-[17px] text-primary break-all max-w-[22ch] font-mono">
{/* 42 chars / 2 lines = 21ch */}
<p className="text-[14px] font-normal leading-[17px] text-primary break-all max-w-[21ch] font-mono">
{address}
</p>
</button>,
Expand Down
12 changes: 7 additions & 5 deletions apps/explorer/src/comps/BlockCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export function BlockCard(props: BlockCard.Props) {
/>
<BlockCard.TimeRow label="UNIX" value={String(timestamp)} />
</div>,
<div key="hash-parent" className="w-full flex flex-col gap-[8px]">
<div key="hash-parent" className="w-full flex flex-col gap-[12px]">
{hash && (
<button
type="button"
Expand All @@ -126,7 +126,9 @@ export function BlockCard(props: BlockCard.Props) {
)}
</div>
</div>
<div className="text-[14px] font-mono font-normal leading-[18px] text-primary break-all max-w-[calc(22ch+22px)]">
{/* the 15px font size needs to match the block number wrapper font size to make sure they align */}
{/* 22 chars/line * (1ch + 1px tracking) */}
<div className="text-[15px] font-mono font-normal leading-[18px] tracking-[1px] text-primary break-all max-w-[calc(22ch+22px)]">
{hash}
</div>
</button>
Expand Down Expand Up @@ -263,11 +265,11 @@ export namespace BlockCard {

export function BlockNumber(props: BlockNumber.Props) {
const { value } = props
const str = String(value).padStart(14, '0')
const str = String(value).padStart(15, '0')
const zerosEnd = str.match(/^0*/)?.[0].length ?? 0
return (
// the 14px font size is used to set the same width as the block hash
<div className="text-[14px] max-w-[calc(22ch+22px)] font-mono">
// the 15px font size is used to set the same width as the block hash
<div className="text-[15px] max-w-[calc(22ch+22px)] font-mono">
<span className="flex justify-between gap-px text-[22px] text-tertiary">
{str.split('').map((char, index) => (
<span
Expand Down
3 changes: 2 additions & 1 deletion apps/explorer/src/comps/TxTransactionCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ export function TxTransactionCard(props: TxTransactionCard.Props) {
)}
</div>
</div>
<p className="text-[14px] font-normal leading-[17px] text-primary break-all max-w-[23ch] font-mono">
{/* 66 chars / 3 lines = 22ch */}
<p className="text-[14px] font-normal leading-[17px] text-primary break-all max-w-[22ch] font-mono">
{hash}
</p>
</button>,
Expand Down
2 changes: 1 addition & 1 deletion apps/explorer/src/routes/_layout/demo/address.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -896,7 +896,7 @@ function Component() {
)}
</div>
</div>
<p className="text-[14px] font-normal leading-[17px] tracking-[0.02em] text-primary break-all max-w-[22ch]">
<p className="text-[14px] font-normal leading-[17px] tracking-[0.02em] text-primary break-all max-w-[21ch]">
{accountAddress}
</p>
</button>,
Expand Down
2 changes: 1 addition & 1 deletion apps/explorer/src/routes/_layout/token/$address.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ function TokenCard(props: {
)}
</div>
</div>
<p className="text-[14px] font-mono font-normal leading-4.25 text-primary break-all max-w-[22ch]">
<p className="text-[14px] font-mono font-normal leading-4.25 text-primary break-all max-w-[21ch]">
{address}
</p>
</button>,
Expand Down