mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-01-26 19:09:52 +00:00
Fix: Slots without type colors (#7081)
## Summary Default to a gray ## Screenshots (if applicable) <img width="416" height="205" alt="image" src="https://github.com/user-attachments/assets/0eeee37d-f9c1-4893-ae1d-ee20cabf0f46" /> ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-7081-Fix-Slots-without-type-colors-2bc6d73d365081499e54e8a10b4b4b02) by [Unito](https://www.unito.io) --------- Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 58 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 81 KiB After Width: | Height: | Size: 81 KiB |
@@ -1,5 +1,5 @@
|
||||
export function getSlotColor(type?: string | number | null): string {
|
||||
if (!type) return '#AAA'
|
||||
const typeStr = String(type).toUpperCase()
|
||||
return `var(--color-datatype-${typeStr})`
|
||||
return `var(--color-datatype-${typeStr}, #AAA)`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user