{# What a list, grid or table shows with no rows, as a macro: components/empty_state.html (the Python EmptyState) and any template with a list that can be empty. {% from "components/_empty_state.html" import empty_state %} {{ empty_state("No orders yet", "Add one from the quote.", action=button_html) }} {{ empty_state("Nothing this week", compact=true) }} title is the main line, text a line under it, action the markup of at most one action (a rendered button or link). icon_name is decoration (aria-hidden); none leaves it out. compact is the one-line form for a section or a table cell: no icon, the title in the muted body type, less padding. #} {% macro empty_state(title, text=none, icon_name="inbox", action=none, compact=false, id=none, css_class=none) -%}
{% if icon_name and not compact %}{% endif %}

{{ title }}

{% if text %}

{{ text }}

{% endif %} {% if action %}
{{ action }}
{% endif %}
{%- endmacro %}