Skip to content

Commit 8095540

Browse files
committed
Fix navbar alignment: use navbar__item class and optimize typography
- Use navbar__item for proper framework integration - Add baseline alignment for labels and values - Use font-weight: 600 for better number readability - Remove monospace to maintain consistent 16px font size
1 parent 1d0ed7e commit 8095540

File tree

2 files changed

+11
-19
lines changed

2 files changed

+11
-19
lines changed

src/components/MevMetrics.module.css

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,17 @@
22
display: flex;
33
align-items: center;
44
gap: 0.75rem;
5-
font-size: 0.875rem;
65
color: var(--ifm-navbar-link-color);
7-
margin-right: 0.75rem;
86
}
97

108
.metric {
119
display: flex;
12-
align-items: center;
10+
align-items: baseline;
1311
gap: 0.25rem;
1412
}
1513

16-
.label {
17-
font-weight: 400;
18-
}
19-
2014
.value {
21-
font-family: monospace;
2215
font-weight: 600;
23-
transition: opacity 0.3s ease;
2416
}
2517

2618
.loading {

src/components/MevMetrics.tsx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -62,16 +62,16 @@ export default function MevMetrics(): JSX.Element | null {
6262

6363
return (
6464
<div
65-
className={`${styles.container} ${styles.clickable}`}
66-
onClick={handleClick}
67-
role="button"
68-
tabIndex={0}
69-
onKeyDown={(e) => {
70-
if (e.key === 'Enter' || e.key === ' ') {
71-
handleClick();
72-
}
73-
}}
74-
>
65+
className={`navbar__item ${styles.container} ${styles.clickable}`}
66+
onClick={handleClick}
67+
role="button"
68+
tabIndex={0}
69+
onKeyDown={(e) => {
70+
if (e.key === 'Enter' || e.key === ' ') {
71+
handleClick();
72+
}
73+
}}
74+
>
7575
<span className={styles.label}>Refund</span>
7676
<span className={styles.separator}>|</span>
7777
<div className={styles.metric}>

0 commit comments

Comments
 (0)