Merge pull request #479 from pascalorg/feat/smart-unit-suffix

editor: smart unit suffix — dim on focus, yield to explicit units
This commit is contained in:
Aymeric Rabot
2026-07-09 16:20:44 +02:00
committed by GitHub
2 changed files with 20 additions and 2 deletions
@@ -330,7 +330,16 @@ export function MetricControl({
type="text"
value={inputValue}
/>
{displayUnit && <span className="ml-[1px] text-muted-foreground">{displayUnit}</span>}
{displayUnit && (
<span
className={cn(
'ml-[1px] transition-opacity duration-150',
hint ? 'opacity-0' : 'text-muted-foreground/40',
)}
>
{displayUnit}
</span>
)}
</div>
) : (
<div
@@ -329,7 +329,16 @@ export function SliderControl({
type="text"
value={inputValue}
/>
{displayUnit && <span className="ml-[1px] text-muted-foreground">{displayUnit}</span>}
{displayUnit && (
<span
className={cn(
'ml-[1px] transition-opacity duration-150',
hint ? 'opacity-0' : 'text-muted-foreground/40',
)}
>
{displayUnit}
</span>
)}
</>
) : (
<div