Sha256: 818a4088ea6a8b1129a1c65b714609e87a4fae6cb72e0b325439e7ae2efb726e
Contents?: true
Size: 1.7 KB
Versions: 10
Compression:
Stored size: 1.7 KB
Contents
<%= render_component_tag class: "px-4 py-3" do %> <div class="flex items-start max-w-[800px]" :class="isNarrowLayout && '!block'"> <label for="param-<%= name %>" class="block font-bold cursor-pointer flex-none py-2 w-[140px] truncate pr-2"> <%= label %> </label> <div class="flex-grow"> <% if field_type == "text" %> <input class="form-input" value="<%= value %>" type="<%= input_type %>" x-bind="bindings.input || {}"> <% elsif field_type == "textarea" %> <textarea class="form-input" rows="4" x-bind="bindings.input || {}"><%= value %></textarea> <% elsif field_type == "select" %> <select class="form-input" x-bind="bindings.input || {}" x-model="value" name="<%= name %>"> <%= options_for_select(@options || [], value) %> </select> <% elsif field_type == "toggle" %> <button type="button" class="<%= value == true ? "bg-lookbook-input-toggle-active" : "bg-lookbook-input-toggle" %> relative inline-flex flex-shrink-0 h-6 w-11 border-2 border-transparent rounded-full cursor-pointer transition-colors ease-in-out duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-input-border-focus" role="switch" @click.stop="value = !value"> <span aria-hidden="true" class="<%= value == true ? "translate-x-5" : "translate-x-0" %> pointer-events-none inline-block h-5 w-5 rounded-full bg-white shadow ring-0 transition ease-in-out duration-200" ></span> </button> <% end %> </div> </div> <% end %>
Version data entries
10 entries across 10 versions & 1 rubygems