fix(webui): align file edits and remove redundant status markers
This commit is contained in:
1 parent
a3e9d0f9a9
commit
a4140dac25
3 files changed
+37
-55
No files matched your search
@@ -10,6 +10,7 @@ export type ActivityStepTone = "neutral" | "active" | "success" | "error";
|
||||
export interface ActivityStepProps {
|
||||
icon?: LucideIcon;
|
||||
marker?: ReactNode;
|
||||
showMarker?: boolean;
|
||||
label: ReactNode;
|
||||
ariaLabel?: string;
|
||||
active?: boolean;
|
||||
@@ -24,6 +25,7 @@ export interface ActivityStepProps {
|
||||
export function ActivityStep({
|
||||
icon: Icon,
|
||||
marker,
|
||||
showMarker = true,
|
||||
label,
|
||||
ariaLabel,
|
||||
active = false,
|
||||
@@ -58,32 +60,35 @@ export function ActivityStep({
|
||||
data-testid="activity-step"
|
||||
aria-label={ariaLabel}
|
||||
className={cn(
|
||||
"relative grid min-w-0 grid-cols-[1.125rem_minmax(0,1fr)] gap-2 py-0.5 text-[13px] leading-5",
|
||||
"relative grid min-w-0 py-0.5 text-[13px] leading-5",
|
||||
showMarker ? "grid-cols-[1.125rem_minmax(0,1fr)] gap-2" : "grid-cols-1",
|
||||
className,
|
||||
)}
|
||||
style={style}
|
||||
>
|
||||
<span
|
||||
className={cn(
|
||||
"flex h-5 w-[1.125rem] shrink-0 items-start justify-center pt-[3px]",
|
||||
)}
|
||||
aria-hidden
|
||||
>
|
||||
{marker ?? (
|
||||
<span
|
||||
className={cn(
|
||||
"grid h-3.5 w-3.5 place-items-center rounded-full border bg-background transition-colors",
|
||||
tone === "active" && "border-muted-foreground/28 text-muted-foreground/72",
|
||||
tone === "success" && "border-emerald-500/28 text-emerald-500/78",
|
||||
tone === "error" && "border-destructive/30 text-destructive/78",
|
||||
tone === "neutral" && "border-muted-foreground/18 text-muted-foreground/50",
|
||||
markerClassName,
|
||||
)}
|
||||
>
|
||||
{Icon ? <Icon className="h-2.5 w-2.5" strokeWidth={2.15} /> : null}
|
||||
</span>
|
||||
)}
|
||||
</span>
|
||||
{showMarker ? (
|
||||
<span
|
||||
className={cn(
|
||||
"flex h-5 w-[1.125rem] shrink-0 items-start justify-center pt-[3px]",
|
||||
)}
|
||||
aria-hidden
|
||||
>
|
||||
{marker ?? (
|
||||
<span
|
||||
className={cn(
|
||||
"grid h-3.5 w-3.5 place-items-center rounded-full border bg-background transition-colors",
|
||||
tone === "active" && "border-muted-foreground/28 text-muted-foreground/72",
|
||||
tone === "success" && "border-emerald-500/28 text-emerald-500/78",
|
||||
tone === "error" && "border-destructive/30 text-destructive/78",
|
||||
tone === "neutral" && "border-muted-foreground/18 text-muted-foreground/50",
|
||||
markerClassName,
|
||||
)}
|
||||
>
|
||||
{Icon ? <Icon className="h-2.5 w-2.5" strokeWidth={2.15} /> : null}
|
||||
</span>
|
||||
)}
|
||||
</span>
|
||||
) : null}
|
||||
<div className={cn("min-w-0", contentClassName)}>
|
||||
{typeof label === "string" ? (
|
||||
<TooltipProvider>
|
||||
|
||||
Reference in new issue
Block a user