app/components/lookbook/dimensions_display/component.rb in lookbook-1.0.3 vs app/components/lookbook/dimensions_display/component.rb in lookbook-1.0.4
- old
+ new
@@ -1,16 +1,13 @@
module Lookbook
class DimensionsDisplay::Component < Lookbook::BaseComponent
def initialize(target:, **html_attrs)
@target = target
+ @alpine_data = alpine_encode(@target)
super(**html_attrs)
end
protected
-
- def alpine_data
- @target.to_json
- end
def alpine_component
"dimensionsDisplayComponent"
end
end