fix: resolve TS build errors for CI
- Add groupRect entry to NODE_DEFAULT_COLORS (required by Record<NodeType, NodeColors>) - Explicitly type Select onValueChange callbacks as (v: string) to satisfy stricter type inference in tsc -b build mode
This commit is contained in:
@@ -93,7 +93,7 @@ export function GroupRectModal({ open, onClose, onSubmit, onDelete, initial, tit
|
||||
{/* Font */}
|
||||
<div className="flex flex-col gap-1.5">
|
||||
<Label className="text-xs text-muted-foreground">Font</Label>
|
||||
<Select value={form.font} onValueChange={(v) => set('font', v)}>
|
||||
<Select value={form.font} onValueChange={(v: string) => set('font', v)}>
|
||||
<SelectTrigger className="bg-[#21262d] border-[#30363d] text-sm h-8">
|
||||
<SelectValue />
|
||||
</SelectTrigger>
|
||||
@@ -160,7 +160,7 @@ export function GroupRectModal({ open, onClose, onSubmit, onDelete, initial, tit
|
||||
{/* Z-order */}
|
||||
<div className="flex flex-col gap-1.5">
|
||||
<Label className="text-xs text-muted-foreground">Z-Order (1 = furthest back)</Label>
|
||||
<Select value={String(form.z_order)} onValueChange={(v) => set('z_order', Number(v))}>
|
||||
<Select value={String(form.z_order)} onValueChange={(v: string) => set('z_order', Number(v))}>
|
||||
<SelectTrigger className="bg-[#21262d] border-[#30363d] text-sm h-8">
|
||||
<SelectValue />
|
||||
</SelectTrigger>
|
||||
|
||||
@@ -22,6 +22,7 @@ export const NODE_DEFAULT_COLORS: Record<NodeType, NodeColors> = {
|
||||
computer: { border: '#a855f7', background: '#21262d', icon: '#a855f7' },
|
||||
cpl: { border: '#e3b341', background: '#21262d', icon: '#e3b341' },
|
||||
generic: { border: '#8b949e', background: '#21262d', icon: '#8b949e' },
|
||||
groupRect: { border: '#00d4ff', background: 'transparent', icon: '#00d4ff' },
|
||||
}
|
||||
|
||||
export function resolveNodeColors(data: Pick<NodeData, 'type' | 'custom_colors'>): NodeColors {
|
||||
|
||||
Reference in New Issue
Block a user