Sha256: 68dcb8a8745eb94d1fc9d9faed9ce9916570b42a22f818b9a7e3fbf9b8c39369

Contents?: true

Size: 910 Bytes

Versions: 1

Compression:

Stored size: 910 Bytes

Contents

<%
stimulus_controller = 'fields--emoji-picker'

form ||= current_fields_form
options ||= {}
other_options ||= {}
value = form.object.send(method)
%>

<%= render 'shared/fields/field', form: form, method: method, options: options, other_options: other_options do %>
  <% content_for :field do %>
    <div data-controller="<%= stimulus_controller %>">
      <%= tag.button data: {action: "#{stimulus_controller}#toggle", target: "#{stimulus_controller}.button"}, class: "button-alternative" do %>
        <span data-target="<%= stimulus_controller %>.display">
          <% if value.present? %>
            <%= value %>
          <% else %>
            <i class="ti ti-face-smile"></i>
          <% end %>
        </span>
      &nbsp;
      <%= t('fields.choose_emoji') %>
      <% end %>
      <%= form.hidden_field method, data: {"#{stimulus_controller}-target": "input"} %>
    </div>

  <% end %>
<% end %>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
bullet_train-themes-1.3.0 app/views/themes/base/fields/_emoji_field.html.erb