fix badge alignment (#3088)
This commit is contained in:
@@ -3,15 +3,16 @@ import { Badge } from "./ui/badge";
|
|||||||
import { cn } from "@/util/utils";
|
import { cn } from "@/util/utils";
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
|
className?: string;
|
||||||
status: Status;
|
status: Status;
|
||||||
};
|
};
|
||||||
|
|
||||||
function StatusBadge({ status }: Props) {
|
function StatusBadge({ className, status }: Props) {
|
||||||
const statusText = status === "timed_out" ? "timed out" : status;
|
const statusText = status === "timed_out" ? "timed out" : status;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Badge
|
<Badge
|
||||||
className={cn("flex h-7 w-24 justify-center", {
|
className={cn("flex h-7 w-24 justify-center", className, {
|
||||||
"bg-green-900 text-green-50 hover:bg-green-900/80":
|
"bg-green-900 text-green-50 hover:bg-green-900/80":
|
||||||
status === Status.Completed,
|
status === Status.Completed,
|
||||||
"bg-orange-900 text-orange-50 hover:bg-orange-900/80":
|
"bg-orange-900 text-orange-50 hover:bg-orange-900/80":
|
||||||
|
|||||||
@@ -190,12 +190,15 @@ function WorkflowRun() {
|
|||||||
{!isEmbedded && (
|
{!isEmbedded && (
|
||||||
<header className="flex justify-between">
|
<header className="flex justify-between">
|
||||||
<div className="space-y-3">
|
<div className="space-y-3">
|
||||||
<div className="flex items-center gap-5">
|
<div className="mr-2 flex items-start gap-5">
|
||||||
{title}
|
{title}
|
||||||
{workflowRunIsLoading ? (
|
{workflowRunIsLoading ? (
|
||||||
<Skeleton className="h-8 w-28" />
|
<Skeleton className="h-8 w-28" />
|
||||||
) : workflowRun ? (
|
) : workflowRun ? (
|
||||||
<StatusBadge status={workflowRun?.status} />
|
<StatusBadge
|
||||||
|
className="mt-[0.27rem]"
|
||||||
|
status={workflowRun?.status}
|
||||||
|
/>
|
||||||
) : null}
|
) : null}
|
||||||
</div>
|
</div>
|
||||||
<h2 className="text-2xl text-slate-400">{workflowRunId}</h2>
|
<h2 className="text-2xl text-slate-400">{workflowRunId}</h2>
|
||||||
|
|||||||
Reference in New Issue
Block a user