app/views/lookbook/workbench/inspector/params/_toggle.html.erb in lookbook-0.4.5 vs app/views/lookbook/workbench/inspector/params/_toggle.html.erb in lookbook-0.4.6
- old
+ new
@@ -1,5 +1,5 @@
-<div id="<%= id %>" x-init="checked = <%= value == "true" ? "true" : "false" %>" data-param-input>
+<div id="<%= id %>" x-init="checked = <%= value == true || value == "true" ? "true" : "false" %>" data-param-input>
<button type="button"
class="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-indigo-400"
:class="{'bg-indigo-500': checked, 'bg-gray-300': !checked}"
role="switch"
@click.stop="checked = !checked; update('<%= name %>', checked)">
\ No newline at end of file