feat: add CreatePlanDialog and InfoChip components; implement chipTint utility; enhance styles for aurora effects

This commit is contained in:
2025-08-29 16:05:41 -06:00
parent 6e84860230
commit f8de39e6d1
6 changed files with 170 additions and 151 deletions
+14
View File
@@ -0,0 +1,14 @@
export function hexToRgb(hex?: string | null): [number, number, number] {
if (!hex) return [37, 99, 235]
const h = hex.replace('#', '')
const v = h.length === 3 ? h.split('').map(c => c + c).join('') : h
const n = parseInt(v, 16)
return [(n >> 16) & 255, (n >> 8) & 255, n & 255]
}
export function chipTint(color?: string | null) {
const [r, g, b] = hexToRgb(color)
return {
borderColor: `rgba(${r},${g},${b},.30)`,
background: `rgba(${r},${g},${b},.10)`,
} as React.CSSProperties
}