glacier-web-cli 0.5.0

Command-line tool for creating and running Glacier applications.
{% props field: Field, options: Vec<(String, String)>, label: String = "", prompt: String = "" %}
{%- let label = if label.is_empty() { field.label.clone() } else { label } %}
<div class="ui-field">
  <label class="ui-label" for="{{ field.id }}">{{ label }}</label>
  <div class="ui-select-wrap">
    <select class="ui-native-select" id="{{ field.id }}" name="{{ field.name }}"{% if field.has_errors() %} aria-invalid="true" aria-describedby="{{ field.id }}-error"{% end %}>
      {%- if !prompt.is_empty() %}
      <option value="">{{ prompt }}</option>
      {%- end %}
      {%- for (value, text) in options.iter() %}
      <option value="{{ value }}"{% if *value == field.value %} selected{% end %}>{{ text }}</option>
      {%- end %}
    </select>
    <svg class="ui-icon" viewBox="0 0 24 24" aria-hidden="true"><path d="m6 9 6 6 6-6"/></svg>
  </div>
  {%- if field.has_errors() %}
  <p class="ui-field-error" id="{{ field.id }}-error">{%- for message in field.errors.iter() %}{{ label }} {{ message }}. {% end %}</p>
  {%- end %}
</div>