Workflow Run Timeline UI (#1433)

This commit is contained in:
Shuchang Zheng
2024-12-23 23:44:47 -08:00
committed by GitHub
parent 682bc717f9
commit 517de67811
42 changed files with 1517 additions and 301 deletions

View File

@@ -0,0 +1,39 @@
import { cn } from "@/util/utils";
import { NavLink } from "react-router-dom";
type Option = {
label: string;
to: string;
};
type Props = {
options: Option[];
};
function SwitchBarNavigation({ options }: Props) {
return (
<div className="flex w-fit gap-2 rounded-sm border border-slate-700 p-2">
{options.map((option) => {
return (
<NavLink
to={option.to}
replace
key={option.to}
className={({ isActive }) => {
return cn(
"cursor-pointer rounded-sm px-3 py-2 hover:bg-slate-700",
{
"bg-slate-700": isActive,
},
);
}}
>
{option.label}
</NavLink>
);
})}
</div>
);
}
export { SwitchBarNavigation };