{# attrs(mapping) — renders pass-through HTML attributes from macro kwargs. Underscores become dashes, so callers write Python keyword arguments: {{ button("Save", hx_post="/tasks", hx_target="#board") }} -> `true` renders a bare boolean attribute; `none` and `false` render nothing. This seam keeps htmx out of the macro definitions: no component needs to know an `hx-*` attribute exists, and adding one never changes fjkit. #} {%- macro attrs(mapping) -%} {%- for key, value in mapping.items() if value is not none and value is not false -%} {{ " " }}{{ key.replace("_", "-") }}{% if value is not true %}="{{ value }}"{% endif %} {%- endfor -%} {%- endmacro -%}