Sha256: 7f77905e4f8cdafc7b8a248a9f324a04253baaf6e180e956a26b3a3ec12eca58
Contents?: true
Size: 1.25 KB
Versions: 12
Compression:
Stored size: 1.25 KB
Contents
<% # headmin/forms/color # # ==== Required parameters # * +attribute+ - Name of the attribute of the form model # * +form+ - Form object # # ==== Optional parameters # * +hint+ - Informative text to assist with data input. HTML markup is allowed. # * +label+ - Text to display inside label tag. Defaults to the attribute name. Set to false if you don"t want to show a label. # * +wrapper+ - Hash with all options for the surrounding html tag # # ==== References # https://headmin.dev/docs/forms/color # https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/color # https://apidock.com/rails/v5.2.3/ActionView/Helpers/FormHelper/color_field # # ==== Examples # Basic version # <%= form_with do |form| %#> # <%= render "headmin/forms/color", form: form, attribute: :active %#> # <% end %#> color = Headmin::Form::ColorView.new(local_assigns) %> <%= render "headmin/forms/wrapper", color.wrapper_options do %> <%= render "headmin/forms/label", color.label_options if color.label? %> <%= form.color_field(color.attribute, color.input_options) %> <%= render "headmin/forms/validation", color.validation_options if color.validate? %> <%= render "headmin/forms/hint", color.hint_options if color.hint? %> <% end %>
Version data entries
12 entries across 12 versions & 1 rubygems