app/views/lookbook/components/_param.html.erb in lookbook-0.5.0.beta.0 vs app/views/lookbook/components/_param.html.erb in lookbook-0.5.0.beta.1
- old
+ new
@@ -1,24 +1,21 @@
<%
value = params.key?(param[:name]) ? params[param[:name]] : param[:default]
%>
<div
- id="<%= @example.id %>-param-<%= param[:name] %>-input"
+ ref="<%= @example.id %>-param-<%= param[:name] %>-input"
class="px-4 py-3"
- x-data="param('<%= param[:name] %>', <%= value.to_json %>)"
- <% if i == 0 %>x-effect="if ($store.inspector.drawer.active === 'params') setFocus()"<% end %>
>
<div class="flex items-start max-w-[800px]">
<div class="flex-none py-2" :style="`width: ${horizontal ? '200' : '120' }px`">
<label for="param-<%= param[:name] %>" class="font-bold">
<%= param[:name].titleize %>
</label>
</div>
<div class="flex-grow">
<%= render "lookbook/inputs/#{param[:input]}",
**param,
- value: value,
- id: "#{@example.id}-param-#{param[:name]}-input"
+ value: value
%>
</div>
</div>
</div>
\ No newline at end of file