import { cn } from '@/lib/utils'
import { resolveNoteIcon } from '../utils/noteIcon'
interface NoteTitleIconProps {
icon: string | null | undefined
size?: number
className?: string
color?: string
testId?: string
}
export function NoteTitleIcon({ icon, size = 14, className, color, testId }: NoteTitleIconProps) {
const resolved = resolveNoteIcon(icon)
if (resolved.kind === 'none') return null
if (resolved.kind === 'emoji') {
return (
{resolved.value}
)
}
if (resolved.kind === 'image') {
return (
{
event.currentTarget.style.display = 'none'
}}
data-testid={testId}
/>
)
}
return (
)
}