Skip to content

Commit 6997228

Browse files
authored
fix(app): align debug gutter text (anomalyco#39782)
1 parent e1335d3 commit 6997228

1 file changed

Lines changed: 36 additions & 18 deletions

File tree

packages/app/src/components/debug-bar.tsx

Lines changed: 36 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -66,29 +66,37 @@ function Cell(props: {
6666
<div
6767
classList={{
6868
"flex min-w-0 items-center": true,
69-
"min-h-[20px] w-fit flex-row justify-start gap-1.5 px-1.5 py-0.5 text-left": !!props.inline,
69+
"min-h-[20px] w-fit justify-start px-1.5 py-0.5 text-left": !!props.inline,
7070
"justify-center text-center": !props.inline,
7171
"min-h-[42px] w-full flex-col rounded-[8px] px-0.5 py-1": !props.inline,
7272
"col-span-2": !!props.wide && !props.inline,
7373
}}
7474
>
7575
<div
7676
classList={{
77-
"text-[10px] leading-none font-black uppercase tracking-[0.04em] opacity-70": true,
77+
"flex min-w-0": true,
78+
"-translate-y-px items-baseline gap-1.5": !!props.inline,
79+
"flex-col items-center": !props.inline,
7880
}}
7981
>
80-
{props.label}
81-
</div>
82-
<div
83-
classList={{
84-
"uppercase leading-none font-bold tabular-nums": true,
85-
"text-[11px]": !!props.inline,
86-
"text-[13px] sm:text-[14px]": !props.inline,
87-
"text-text-on-critical-base": !!props.bad,
88-
"opacity-70": !!props.dim,
89-
}}
90-
>
91-
{props.value}
82+
<div
83+
classList={{
84+
"text-[10px] leading-none font-black uppercase tracking-[0.04em] opacity-70": true,
85+
}}
86+
>
87+
{props.label}
88+
</div>
89+
<div
90+
classList={{
91+
"uppercase leading-none font-bold tabular-nums": true,
92+
"text-[11px]": !!props.inline,
93+
"text-[13px] sm:text-[14px]": !props.inline,
94+
"text-text-on-critical-base": !!props.bad,
95+
"opacity-70": !!props.dim,
96+
}}
97+
>
98+
{props.value}
99+
</div>
92100
</div>
93101
</div>
94102
)
@@ -116,15 +124,25 @@ function FocusCell(props: { active: boolean; inline?: boolean; onClick: () => vo
116124
aria-pressed={props.active}
117125
classList={{
118126
"flex min-w-0 items-center font-mono uppercase hover:bg-surface-raised-base focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-[-2px] focus-visible:outline-border-focus": true,
119-
"min-h-[20px] w-fit flex-row justify-start gap-1.5 rounded px-1.5 py-0.5 text-left": !!props.inline,
127+
"min-h-[20px] w-fit justify-start rounded px-1.5 py-0.5 text-left": !!props.inline,
120128
"min-h-[42px] w-full flex-col justify-center rounded-[8px] px-0.5 py-1 text-center": !props.inline,
121129
"bg-surface-raised-base text-text-strong": props.active,
122130
}}
123131
onClick={props.onClick}
124132
>
125-
<span class="text-[10px] leading-none font-black tracking-[0.04em] opacity-70">FOCUS</span>
126-
<span classList={{ "leading-none font-bold": true, "text-[11px]": !!props.inline, "text-[13px]": !props.inline }}>
127-
{props.active ? "ON" : "OFF"}
133+
<span
134+
classList={{
135+
flex: true,
136+
"-translate-y-px items-baseline gap-1.5": !!props.inline,
137+
"flex-col items-center": !props.inline,
138+
}}
139+
>
140+
<span class="text-[10px] leading-none font-black tracking-[0.04em] opacity-70">FOCUS</span>
141+
<span
142+
classList={{ "leading-none font-bold": true, "text-[11px]": !!props.inline, "text-[13px]": !props.inline }}
143+
>
144+
{props.active ? "ON" : "OFF"}
145+
</span>
128146
</span>
129147
</button>
130148
)

0 commit comments

Comments
 (0)