<% stimulus_controller = 'fields--color-picker' form ||= current_fields_form html_options ||= {} html_options[:id] ||= form.field_id(method) multiple ||= false other_options ||= {} options ||= options_for(form, method) value = form.object.send(method) color_selected_classes = "ring-2 ring-offset-2" %> <% content = render 'shared/fields/field', form: form, method: method, options: html_options, other_options: other_options do %> <% content_for :field do %>
-initial-color-value="<%= value %>" data-<%= stimulus_controller %>-color-selected-class="<%= color_selected_classes %>" > <%= form.hidden_field method, value: value, data: {"#{stimulus_controller}-target": "colorPickerValue"} %>
-target="colorOptions"> <% options[:color_picker_options].each do |color| %> <% end %>
-target="colorInput"/> -target="pickerContainer" data-action="keydown-><%= stimulus_controller %>#handleKeydown" >
<% end %> <% end %> <%# The `-mb-1` is making up for the `mb-1` on each of the buttons. This allows them to wrap with appropriate vertical spacing. %>
<%= content %>