muddle/modules/amezing/components/alert.spug
2026-10-23 08:53:07 -04:00

8 lines
264 B
Text

props
type: 'note' | 'tip' | 'important' | 'warning' | 'caution'
content?: string | (() => string | Promise<string>)
blockquote(class='markdown-alert markdown-alert-' + type)
if typeof content === 'function'
!= await content()
else
= content ?? ''