amezing/components/statement.spug
2026-10-23 08:53:07 -04:00

11 lines
424 B
Text

props
kind: 'archive' | 'trigger' | 'disclaimer'
content?: string | (() => string | Promise<string>)
div.statement-container(class=kind)
strong.title
i.ph.ph-(kind === 'archive' ? 'box-arrow-down' : 'warning')(aria-hidden="true")
span= kind === 'archive' ? 'Archived' : kind === 'trigger' ? 'Trigger warning' : 'Disclaimer'
if typeof content === 'function'
!= await content()
else
!= content ?? ''