Sha256: 6d0be524bf187bf135b71b8a21742091279dc3c91355a0dfbf028716d1ac2d85

Contents?: true

Size: 894 Bytes

Versions: 2

Compression:

Stored size: 894 Bytes

Contents

<div class="ariadne-space-y-2 w-full">
  <label
    class="<%= style(:label) %>"
    for="<%= @name %>"><%= @label %></label>
  <% if required? %>
    <span aria-hidden="true">*</span>
  <% end %>
  <%= content_tag(
    input? ? :input : :textarea,
    input? ? nil : html_attrs[:value],
    name: @name,
    class: html_attrs[:class],
    type: @type,
    **html_attrs.except(:class)
  ) %>
  <% if @validation_message %>
    <%= render(Primer::BaseComponent.new(tag: :div, **@validation_arguments)) do %>
      <span class="FormControl-inlineValidation--visual"><%= render(Primer::Beta::Octicon.new(icon: :"alert-fill", size: :xsmall, aria: { hidden: true })) %></span>
      <span><%= @validation_message %></span>
    <% end %>
  <% end %>
  <% if caption? %>
    <p id="<%= @name %>-description" class="<%= style(:caption, theme:, size:, width:) %>"><%= @caption %></p>
  <% end %>
</div>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ariadne_view_components-0.0.90 app/components/ariadne/form/text_field/component.html.erb
ariadne_view_components-0.0.89.1 app/components/ariadne/form/text_field/component.html.erb