{% from "components/icon.html" import Icon %} {% macro Label(type=None, classes="") -%} {% set label_info = { "invite_pending": {"icon": "envelope", "text": "invite pending", "color": "success",}, "invite_expired": {"icon": "envelope", "text": "invite expired", "color": "error",}, "changes_pending": { "icon": "exchange", "text": "changes pending", "color": "default", }, "ppoc": {"text": "primary point of contact"} } %} {% if type in label_info.keys() -%} {% if label_info[type]["icon"] %} {{ Icon(label_info[type]["icon"]) }} {% endif %} {{ label_info[type]["text"] }} {%- endif %} {%- endmacro %}