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:
Alexander Brown
2025-12-01 15:05:59 -08:00
committed by GitHub
parent 202dc3bbb2
commit 072f1f6ced
3 changed files with 1 additions and 1 deletions

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

View File

@@ -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)`
}