MCPcopy Create free account
hub / github.com/ShipSecAI/studio / getNodeStyle

Function getNodeStyle

frontend/src/components/workflow/nodeStyles.ts:16–62  ·  view source on GitHub ↗
(state: NodeStatus)

Source from the content-addressed store, hash-verified

14 * Get styling for a node based on its execution state
15 */
16export function getNodeStyle(state: NodeStatus): NodeStateStyle {
17 const styles: Record<NodeStatus, NodeStateStyle> = {
18 idle: {
19 border: 'border-border',
20 bg: 'bg-background',
21 icon: null,
22 },
23 running: {
24 border: 'border-blue-500',
25 bg: 'bg-blue-50 dark:bg-blue-950/30',
26 icon: 'Activity',
27 iconClass: 'text-blue-600 dark:text-blue-400',
28 },
29 success: {
30 border: 'border-border',
31 bg: 'bg-background',
32 icon: 'CheckCircle',
33 iconClass: 'text-green-600 dark:text-green-400',
34 },
35 error: {
36 border: 'border-red-500',
37 bg: 'bg-red-50 dark:bg-red-950/30',
38 icon: 'XCircle',
39 iconClass: 'text-red-600 dark:text-red-400',
40 },
41 waiting: {
42 border: 'border-gray-400 dark:border-gray-600',
43 bg: 'bg-gray-50 dark:bg-gray-900/30',
44 icon: 'Clock',
45 iconClass: 'text-gray-500 dark:text-gray-400',
46 },
47 awaiting_input: {
48 border: 'border-blue-500 border-dashed',
49 bg: 'bg-blue-50 dark:bg-blue-950/30',
50 icon: 'ShieldAlert',
51 iconClass: 'text-blue-600 dark:text-blue-400',
52 },
53 skipped: {
54 border: 'border-slate-300 dark:border-slate-700 border-dashed',
55 bg: 'bg-slate-50 dark:bg-slate-900/40 opacity-70',
56 icon: 'Ban',
57 iconClass: 'text-slate-500 dark:text-slate-400',
58 },
59 };
60
61 return styles[state];
62}

Callers 1

WorkflowNodeFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected