Skip to content

Self-hosted project management for devs and their clients: tickets, time tracking, docs and meetings, with an AI assistant that cites its sources. AGPL-3.0.

1.2 KB
Raw Blame
<div class="<%= wrapper_classes %>">
  <!-- Label -->
  <label for="<%= select_id %>" class="<%= label_classes %>">
    <%= @label %>
  </label>
  
  <!-- Select with Custom Arrow -->
  <div class="relative">
    <select class="<%= component_classes %>" <%= tag.attributes(component_attributes) %>>
      <!-- Placeholder option -->
      <% if placeholder_option? %>
        <option value="" <%= 'selected' if @selected.blank? %> disabled>
          <%= @placeholder %>
        </option>
      <% end %>
      
      <!-- Options -->
      <% normalized_options.each do |text, value| %>
        <option value="<%= value %>" <%= 'selected' if option_selected?(value) %>>
          <%= text %>
        </option>
      <% end %>
    </select>
    
    <!-- Custom Arrow (Neo Brutalist Style) -->
    <div class="pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3">
      <div class="w-0 h-0 border-l-4 border-r-4 border-t-4 border-l-transparent border-r-transparent border-t-black"></div>
    </div>
  </div>

  <!-- Description -->
  <% if @description.present? %>
    <p class="<%= description_classes %>">
      <%= @description %>
    </p>
  <% end %>
</div>