Sha256: 33f4b9fb5d4e47c9615c039c35574a62fe707d1f9e1cb7d3d1e6562590a4f92f

Contents?: true

Size: 877 Bytes

Versions: 1

Compression:

Stored size: 877 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],
    **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

1 entries across 1 versions & 1 rubygems

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