Jon/debugger layout (#3340)

This commit is contained in:
Jonathan Dobson
2025-09-02 10:07:08 -04:00
committed by GitHub
parent aee181c307
commit 41b341f3d8
16 changed files with 604 additions and 249 deletions

View File

@@ -0,0 +1,36 @@
import { ActionType, ReadableActionTypes } from "@/api/types";
import {
CheckCircledIcon,
CursorArrowIcon,
InputIcon,
QuestionMarkIcon,
} from "@radix-ui/react-icons";
import { Tip } from "@/components/Tip";
type Props = {
actionType: ActionType;
};
const icons: Partial<Record<ActionType, React.ReactNode>> = {
click: <CursorArrowIcon className="h-4 w-4" />,
complete: <CheckCircledIcon className="h-4 w-4" />,
input_text: <InputIcon className="h-4 w-4" />,
};
function ActionTypePillMinimal({ actionType }: Props) {
const icon = icons[actionType] ?? <QuestionMarkIcon className="h-4 w-4" />;
if (!icon) {
return null;
}
return (
<Tip content={ReadableActionTypes[actionType]}>
<div className="flex w-full items-center justify-center gap-2">
{icon}
</div>
</Tip>
);
}
export { ActionTypePillMinimal };