Function
AlertBlock
({
type = "info",
icon,
children,
className,
...props
}: Props)
Source from the content-addressed store, hash-verified
| 28 | }; |
| 29 | |
| 30 | export function AlertBlock({ |
| 31 | type = "info", |
| 32 | icon, |
| 33 | children, |
| 34 | className, |
| 35 | ...props |
| 36 | }: Props) { |
| 37 | const { className: iconClassName, icon: Icon } = iconMap[type]; |
| 38 | return ( |
| 39 | <div |
| 40 | {...props} |
| 41 | className={cn( |
| 42 | "flex items-start flex-row gap-4 rounded-lg p-2", |
| 43 | iconClassName, |
| 44 | className, |
| 45 | )} |
| 46 | > |
| 47 | <div className="flex-shrink-0 mt-0.5"> |
| 48 | {icon || <Icon className="text-current" />} |
| 49 | </div> |
| 50 | <div className="flex-1 min-w-0"> |
| 51 | <span className="text-sm text-current break-words overflow-wrap-anywhere whitespace-pre-wrap"> |
| 52 | {children} |
| 53 | </span> |
| 54 | </div> |
| 55 | </div> |
| 56 | ); |
| 57 | } |
Callers
nothing calls this directly
Tested by
no test coverage detected