Sha256: 558e6ec8b0bd3be83d1c9c4267c7447a1f9fe574fad160f40e894241e2f99c34

Contents?: true

Size: 766 Bytes

Versions: 2

Compression:

Stored size: 766 Bytes

Contents

<label class="flex flex-col gap-2 w-full">
  <div class="flex gap-1 items-center">
    <span class="
      text-gray-700
      body-tiny-bold
      body-text-xs-semibold
    "><%= @label %></span>

    <%= render component('ui/toggletip').new(text: @tip) if @tip.present? %>
  </div>

  <% if @input_attributes.present? %>
    <%= render component('ui/forms/input').new(**@input_attributes) %>
  <% else %>
    <%= content %>
  <% end %>

  <% if @hint.present? || @error.present? %>
    <div class="
      body-tiny
      [:disabled~&]:text-gray-300 text-gray-500
      flex gap-1 flex-col
    ">
      <%= tag.span @hint if @hint.present? %>
      <%= tag.span safe_join(@error, tag.br), class: "text-red-400" if @error.present? %>
    </div>
  <% end %>
</label>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
solidus_admin-0.0.2 app/components/solidus_admin/ui/forms/field/component.html.erb
solidus_admin-0.0.1 app/components/solidus_admin/ui/forms/field/component.html.erb